I know it goes without saying but given the question; be very careful with rm, particularly with -r being used. its one of the commands you really want to make sure you know what it'll do. Try using -i which will prompt for each deletion, until you get comfortable with it. – SirexOct 20 '11 at 11:27
Does the folder you are trying to delete contain any special characters or spaces? Have you tried putting foldername in quotes? – chuckOct 20 '11 at 12:23
The issue is difficult to explain without knowing further details. Are there really no other error messages? Could be that one or more files could not be removed because of permission problems. In this case the parent directory cannot be removed also. – ktfOct 20 '11 at 12:56
Is the foldername you're trying to remove literally . Because it is defined as an error to attempt to remove . and ... Instead, change one level up and then remove it.