Skip to content

How To Remove A Non-Empty Directory in Ubuntu

It’s really very simple.

Bring up a terminal window.

At the command prompt type sudo rm -r <directory-name>

So, if you wanted to remove a directory called ’spare’ that was in the directory ‘etc’ which is itself off the home directory you would simply type without the quotes ’sudo rm -r /etc/spare’

The system will prompt you for your administrative password. Enter that, hit enter, and the job is done.

blog comments powered by Disqus

ian.may is Digg proof thanks to caching by WP Super Cache