Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

Why rm dirname doesn't work ? It says it's a directory, well that I know :) but I want to delete it not even recursively as it is empty.

share|improve this question
    
The answer below is correct, but there's also no harm in doing rm -rf on an empty directory; it's identical to rmdir. Most of the time, if I don't care about what's in a directory, I'll use rm -rf rather than worry about whether or not it might be empty. – Jim Stewart Dec 20 '12 at 17:38
up vote 4 down vote accepted

Because you need to use rmdir?

share|improve this answer
    
that one works this time, thanks :) – asksuperuser Nov 1 '09 at 22:13
rm -d my_directory

from 'man rm':

-d Attempt to remove directories as well as other types of files.

share|improve this answer
    
I tried with -d it still says the same message – asksuperuser Nov 1 '09 at 22:13

You must log in to answer this question.