0
root@Umar:/home/umar# rmdir /usr/local/Reliance_Netconnect
rmdir: failed to remove ‘/usr/local/Reliance_Netconnect’: Directory not empty
1

2 Answers 2

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.

1
  • 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 3, 2014 at 5: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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .