0
root@Umar:/home/umar# rmdir /usr/local/Reliance_Netconnect
rmdir: failed to remove ‘/usr/local/Reliance_Netconnect’: Directory not empty
amc
  • 7,022
  • 7
  • 39
  • 51
A Umar Mukthar
  • 785
  • 2
  • 9
  • 32
  • 2
    possible duplicate of [How to delete a non-empty directory in Terminal?](http://askubuntu.com/questions/217893/how-to-delete-a-non-empty-directory-in-terminal) – amc Sep 03 '14 at 04:25

2 Answers2

2

To delete a directory that is not empty, you need to use rm -rf.

This is basic linux, and so is using sudo instead of a root account; you're setting yourself up for disaster. Be careful.

Marty Fried
  • 18,026
  • 5
  • 51
  • 52
  • you *don't* need to use `-f` and might be a bad suggestion for someone who appears to not know what they're doing. also, `sudo` is not necessarily "basic Linux." there's still a camp that believes it makes more sense to use the `root` account. it *is* basic Debian/Ubuntu/etc. – wxl Sep 03 '14 at 05:33
1

You must have an empty directory for rmdir to work.

The typical way to recursively delete a directory and all of it's contents is with the rm -r command where the -r is short for recursive.

wxl
  • 901
  • 5
  • 23