Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Nov 12 '09 at 10:09

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

4 Answers 4

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

Try

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

 
discard

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