I am using Fedora 9. I removed the user using userdel -r command. The user is removed, but the home directory still remains. When I tried to remove the home directory (rm -rf /home/user/), I get the following message:

rm: cannot remove '/home/user/.gvfs': Permission denied

This happens on random occasions. Which scenario does this occur? Why is this occurring?


The .gvfs is created by GVfs under GNOME. Looking at the Wikipedia page, you can find that GVfs (abbreviation for GNOME Virtual file system) is GNOME's userspace virtual filesystem designed to work with the I/O abstraction of GIO.

The most probable situation concerning your problem is that some Gnome program still runs in the background with the user id of the user you want to delete. I experienced the same problem as well.

The solution is to kill all programs associated with that user id. From the shell you can check whether some program is running with that user id before terminating them by typing

ps -U username

You can terminate (kill) those programs by using the command always from the shell

sudo pkill -u USERID

where you can find the user id for instance by

 id -u username

Afterwards, it should be possible to remove the user home directory by

rm -r /home/username

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.