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.

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter
This entry was posted in Computers and tagged , , , , . Bookmark the permalink.

Comments are closed.

blog comments powered by Disqus