Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Debian, I want to remove a subdirectory of my home directory. When I try to remove it (with sudo), I get a message saying the directory is not empty, but I cannot see any file inside the directory with ls -l.

How do I remove this directory?

share|improve this question

migrated from Nov 12 '09 at 10:09

This question came from our site for professional and enthusiast programmers.

rm -rf /home/user/directory

share|improve this answer
Thanks for this help. it worked. Thanks to all of you for your quick response. :-) – Reji S nair Nov 12 '09 at 9:52

try ls -a to see if there's any hidden file.

You can remove recursively using rm -r

share|improve this answer


ls -a -l

To show hidden files, then remove them.

Or, to force the directory and everything inside it to be deleted, try:

rm -r directory
share|improve this answer

Load up your terminal and type the following:

cd ~/

rm -rf ./my-directory

This should work assuming you have the correct permissions

share|improve this answer
I'm sorry, but there is a reason you are suggesting to connect via SSH? – mrucci Nov 12 '09 at 11:11
Sorry, I thought you were doing this on a remote machine. I've updated my answer accordingly. – KushalP Nov 30 '09 at 19:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.