Cannot delete trash.

I have a folder with other folders & files in it. I want it deleted. When I empty trash it says permission denied.

11.1, Gnome.

Open a terminal window (console), and become root with su command. Then navigate to Trash directory, located in user’s home directory. Something like:

cd /home/name_of_user/.local/share/Trash/

There are 2 directories contained here: ‘files’ and ‘info’. You can either delete the directories and files with

rm -r * (take care to make sure you’re in right directory first)

or navigate to ‘files’ directory and remove the offending files with

rm -f …

(The directories get regenerated the next time files are moved to trash anyway).

the name of the folder is 1

william@linux-rb3c:~> su
linux-rb3c:/home/william # cd/home/william/share/trash
bash: cd/home/william/share/trash: No such file or directory
linux-rb3c:/home/william # cd/home/william/.local/share/trash
bash: cd/home/william/.local/share/trash: No such file or directory
linux-rb3c:/home/william # cd /home/william/.local/share/Trash/
linux-rb3c:/home/william/.local/share/Trash # rm -1
rm: invalid option – ‘1’
Try `rm --help’ for more information.
linux-rb3c:/home/william/.local/share/Trash #

You need to make sure you are in the correct directory first (and take care with syntax). The ls -a
command will show whats contained within a directory. If you see ‘files’ directory, then do

cd files

ls -a

Delete required directory with recursive flag

rm -r 1

(Similarly rm -f … for files).

No, no it’s so confusing. Recursion, omg. :slight_smile:

@william, what you did here:

william@linux-rb3c:~> su

linux-rb3c:/home/william # cd /home/william/.local/share/Trash/
linux-rb3c:/home/william/.local/share/Trash # rm -1
rm: invalid option – ‘1’
Try `rm --help’ for more information.
linux-rb3c:/home/william/.local/share/Trash #

was absolutely right, so repeat it - some lines being removed they have NO sense, so you don’t need to type them again.
Now make sure that you are in the right directory by typing:


The output should be


if you can’t see this file, make sure that you have typed exactly the same commands as before!
No remove the file with:

rm 1

this is a number - one - not a letter!

There are a lot of spaces missing in what you type!!!
Take care. When you would have copied/pasted the commands this would not have been possible.

Also I would recommend all involved very strongly to use the CODE tags around this sort of coding (like ram88 does) to make evry character readable.

I just had this problem. All the explanations above are correct, but I thought someone might find this useful. I solved it like this:

1.- Open a terminal and become root.


2.- Go to /home/user/.local/share/Trash, where user is your username.

cd /home/user/.local/share/Trash

3.- See which files there are in the folder you’re in


Typing l instead of ls allows you to see all files, even the hidden files. There should be the two folders mentioned by deano above: ‘files’ and ‘info’. Go to ‘files’ using the cd command.

cd files

3.- You should be able to see the files you want to delete. If it is a file, type

rm filename

If it’s a directory, go to step 4. Directories are displayed in blue.

4.- If it’s a directory, enter the directory, again with the cd command, and check out if there are any files, and repeat what you did in 3. If it’s a directory, enter it and do the same. The idea is to go all the way down and delete one by one the files and the directories, then go one step up, do the same and so on, until you are again in the ‘files’ directory, empty. Note: To go up one level, type

cd ..

Hope this helps.

I´ve had this issue a long time ago too. How did I solve it?
Well, easy: Log in as root once, navigate to the trash in /home/<username>/Desktop (or whereever your bin is located), right-click and empty.

Then log out, enter your normal-user session adn you should be good to go. :slight_smile:


Okay, but logging in as root isn’t the best idea if you want to do anything. I don’t recommend this. You can cause even more (serious)problems then your trash-corruption. :wink:

Fully agreed. If the issue is really bothering and unless you know what you are doing in root, it should not be a problem though…
Yeah, and I almost forgot to add the golden rule: Think, BEFORE you act. :wink:


All this is bizarre and unbelievable. I’m wondering what on earth happened that you couldn’t ‘empty trash’ in the first place.

SHIFT-DEL saves time
or just use DEL from the context menu, if you have it enabled.
I very rarely send anything to trash.

Hi All,

I’m stuck here -

linux-n7rn:~ # cd /home/jjmacey/.local/share/Trash/
linux-n7rn:/home/jjmacey/.local/share/Trash # l
total 16
drwx------ 4 jjmacey users 4096 Jan 12 00:47 ./
drwx------ 9 jjmacey users 4096 Mar 2 11:03 …/
drwx------ 3 jjmacey users 4096 Mar 22 22:21 files/
drwx------ 2 jjmacey users 4096 Mar 22 22:21 info/
linux-n7rn:/home/jjmacey/.local/share/Trash # cd files
linux-n7rn:/home/jjmacey/.local/share/Trash/files # l
total 12
drwx------ 3 jjmacey users 4096 Mar 22 22:21 ./
drwx------ 4 jjmacey users 4096 Jan 12 00:47 …/
drwxrwxr-x 3 jjmacey users 4096 Mar 19 06:44 Moonshiner-1.0beta/
linux-n7rn:/home/jjmacey/.local/share/Trash/files # rm Moonshiner-1.0beta/
rm: cannot remove `Moonshiner-1.0beta/’: Is a directory
linux-n7rn:/home/jjmacey/.local/share/Trash/files #

I think that I went wrong when I used nautilus to get rid of those Desktop icons that came with openSuSE 11.1

Any help?

You don’t need to be root user to delete files in your home Trash,
unless you were root user and put them there?

Now this use the following command with care!!!

cd /home/jjmacey/.local/share/Trash/
(this will confirm your in the correct location!!)
rm -Rf info/*
rm -Rf files/*

To remove the desktop files it’s

sudo rm /usr/share/dist/desktop-files/*

Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.1 (i586) Kernel
up 2:26, 1 user, load average: 0.38, 0.30, 0.26
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

I’ve bookmarked to try this later.

It seems I was a root user.