Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

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?

share|improve this question

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
share|improve this answer

Your Answer


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

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