7

I'm trying to remove a directory labeled 'phoneBackup' but it's not empty, it contains several dozen image files (.jpg, .gif, etc). I'm running the command "rmdir -r phoneBackup" from the parent directory, but upon execution I get the following error:

rmdir: invalid option -- 'r' Try `rmdir --help' for more information.

Both the 'rmdir --help' and the 'man rmdir' commands don't show -r as an option. Is there a package I need to install, or is there some other way of removing the directory I can use in place of rmdir? I'm running Elementary OS Luna, which is built off of Ubuntu 12.04.

2 Answers2

8

rmdir work on empty directories. to remove directory and files/directories inside use

rm -rf /path/to/directory
Romeo Ninov
  • 7,848
-3

another way to delete directory and its subdirectory/file is using WinSCP, instead of using rm -rf / which probably wipe out the entire linux installation.