0
root@Umar:/home/umar# rmdir /usr/local/Reliance_Netconnect
rmdir: failed to remove ‘/usr/local/Reliance_Netconnect’: Directory not empty
amc
  • 7,142
A Umar Mukthar
  • 785
  • 2
  • 9
  • 32

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,466
  • 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