Can't empty trash completely
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Can't empty trash completely
I had dozens of files in the trash can and when I did an empty trash command, most of them disappeared except for 5 files, most of them big, i.e., over 1 GB.
Now when I try to empty trash again nothing happens. The files are still there.
I right clicked on the files and selected "Delete Permanently" but got error message: "Error while deleting. Failed to delete the item from the trash."
These files are not connected to any running program that I am aware of. Can anyone suggest a way to delete them? Thanks.
Now when I try to empty trash again nothing happens. The files are still there.
I right clicked on the files and selected "Delete Permanently" but got error message: "Error while deleting. Failed to delete the item from the trash."
These files are not connected to any running program that I am aware of. Can anyone suggest a way to delete them? Thanks.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Can't empty trash completely
Nautilus>Edit>Preferences>Behavior TAB Trashgumby wrote:I right clicked on the files and selected "Delete Permanently" but got error message: "Error while deleting. Failed to delete the item from the trash."
- [ ] Ask before emptying Trash or deleting files
--if you leave this turned on you always get asked if you are sure you want to delete those file(s)
[x]Include a delete command that bypasses Trash
--although that is misleading as it is not a wipe or shred of that file (a proper permanent deletion) , it simply dissociates the file (link) from the system, so that the system is not aware that it exists..
--in that way it is similar to windows.
https://bugzilla.redhat.com/show_bug.cgi?id=456035
http://ubuntuforums.org/showthread.php?t=785512
https://bugs.launchpad.net/ubuntu/+sour ... bug/366379
https://bugs.launchpad.net/ubuntu/+sour ... o_package=
- Trash does not empty search..
In terminal, check Trash contents
- ls -l /home/userID/.local/share/Trash
Example removable for one of the directories in Trash (files, expunged, info)
- sudo rm -r /home/userID/.local/share/Trash/files
--a shorter command for a similar result
Permanently delete files (shred and other methods)
http://ubuntuforums.org/showthread.php?t=868953
--use this location /home/userID/.local/share/Trash
Re: Can't empty trash completely
Dr.Hu,
i Just tried checking "Include a delete command that bypasses trash." Trash still won't empty. When I open trash I see the 5 big files (several GB each) When I try to "delete permanently" one of them, I get the error message:
Error while deleting:
There was an error getting information about [name of file]
Show more details:
No such file or directory
When I try deleting permanently the other 4, I get this message:
Error while deleting:
There was an error deleting [name of file]
Show more details:
Failed to delete the item from the trash.
I still haven't tried your other suggestions. Will do so soon. Thanks.
i Just tried checking "Include a delete command that bypasses trash." Trash still won't empty. When I open trash I see the 5 big files (several GB each) When I try to "delete permanently" one of them, I get the error message:
Error while deleting:
There was an error getting information about [name of file]
Show more details:
No such file or directory
When I try deleting permanently the other 4, I get this message:
Error while deleting:
There was an error deleting [name of file]
Show more details:
Failed to delete the item from the trash.
I still haven't tried your other suggestions. Will do so soon. Thanks.
Re: Can't empty trash completely
by the way, I wondered if maybe a different file manager could delete the files, so I downloaded a few like Gnome Commander and Beesoft Commander. But I can't get either of them to even display the trash can. They don't seem to operate like the Windows file managers that show everything on the desktop, i.e., xplorer2
Re: Can't empty trash completely
gumby wrote:by the way, I wondered if maybe a different file manager could delete the files, so I downloaded a few like Gnome Commander and Beesoft Commander. But I can't get either of them to even display the trash can.
...But I can't get either of them to even display the trash can.
- My first reply..
Example removable for one of the directories in Trash (files, expunged, info)
sudo rm -r /home/userID/.local/share/Trash/files
--and should be able to be seen under Gnome-commander if you open .local
- In Gnome-commander check the Settings>Options>Filters, see if you are hiding (Filetypes to Hide, Also Hide) hidden files, in which case the .local file (directory) won't show in the display..
- /home/userID/.local/share/Trash
sudo rm -r /home/userID/.local/share/Trash/
sudo rm -r ~/.local/share/Trash
--shortcut for /home for the logged in user ( ~/ )
ls /home/userID/.local/share/Trash/files
ls: cannot access /home/userID/.local/share/Trash/files: No such file or directory
If you get this msg when you check the subdir (subdirectory) of Trash (files, info, expunged),
--it means the Trash (files) is emptied
Re: Can't empty trash completely
I had that same problem. The problem was the permission, or user privileges.
I finally manage to totally delete the files opening the .Trash folder as root (right click --> open as root ... I love this option). There you have a few folders "Files", "expunged" and something else... I just Shift+Del to permanently delete the files, and voilà !
Or you could log out, and log in as root ...
Hope this can help.
I finally manage to totally delete the files opening the .Trash folder as root (right click --> open as root ... I love this option). There you have a few folders "Files", "expunged" and something else... I just Shift+Del to permanently delete the files, and voilà !
Or you could log out, and log in as root ...
Hope this can help.
Re: Can't empty trash completely
DrHu wrote:gumby wrote:by the way, I wondered if maybe a different file manager could delete the files, so I downloaded a few like Gnome Commander and Beesoft Commander. But I can't get either of them to even display the trash can.
...But I can't get either of them to even display the trash can.The Trash folder is under /home/userID/.local/share/
- My first reply..
Example removable for one of the directories in Trash (files, expunged, info)
sudo rm -r /home/userID/.local/share/Trash/files
--and should be able to be seen under Gnome-commander if you open .local
- In Gnome-commander check the Settings>Options>Filters, see if you are hiding (Filetypes to Hide, Also Hide) hidden files, in which case the .local file (directory) won't show in the display..
Thanks DrHu, I now can see the trash folder in Gnome Commander.
DrHu wrote: You will probably have to end up doing it with root privilege, open a terminal in Gnome-commander when you are at the correct directory (folder)--and delete,
- /home/userID/.local/share/Trash
sudo rm -r /home/userID/.local/share/Trash/
sudo rm -r ~/.local/share/Trash
--shortcut for /home for the logged in user ( ~/ )
Gnome Commander did not show any files in Trash or in Expunged.
THen I did as you instruct:
gumby@Saturn ~/.local/share/Trash $ sudo rm -r /home/gumby/.local/share/Trash/
[sudo] password for gumby:
gumby@Saturn ~/.local/share/Trash $ sudo rm -r ~/.local/share/Trash
sudo: cannot get working directory
rm: cannot remove `/home/gumby/.local/share/Trash': No such file or directory
gumby@Saturn ~/.local/share/Trash $
and now my Trash folder has disappeared in Gnome Commander although it is still visible in Nautilus. Nautilus trash still shows the undeleted files I am trying to get rid of.
Okay, maybe the files are not there, but they are still showing in my trash on Nautilus.DrHu wrote: ls /home/userID/.local/share/Trash/files
ls: cannot access /home/userID/.local/share/Trash/files: No such file or directory
If you get this msg when you check the subdir (subdirectory) of Trash (files, info, expunged),
--it means the Trash (files) is emptied
Re: Can't empty trash completely
Thanks for the suggestion, Hernando, but there is no "open as root" option in my right click menu. I remember a few months ago I installed something to try to get this option, but it didn't work.hernando wrote:I had that same problem. The problem was the permission, or user privileges.
I finally manage to totally delete the files opening the .Trash folder as root (right click --> open as root ... I love this option). There you have a few folders "Files", "expunged" and something else... I just Shift+Del to permanently delete the files, and voilà !
Or you could log out, and log in as root ...
Hope this can help.
Re: Can't empty trash completely
Try just right clicking in your home folder. If you do it in the Trash you won't get the option.
If that fails open a terminal and use
If that fails open a terminal and use
Code: Select all
gksu nautilus &
Re: Can't empty trash completely
I had sometimes similar problems in Ubuntu 6.10
Case 1: Symbolic links
This is easy to solve:
1. Create an empty folder.
2. Move it to Trash in a usual way (Right Click -> Trash)
3. Move links to that folder
4. Delete that folder in a usual way
Case 2: Files owned by root
gksu nautilus
This kind of nautilus is red like tomato in Mint.
You can change permissions of those files (Right Click -> Properties -> Permissions), and then remove them in a usual way.
If somebody likes Midnight Commander, he can use it too for many purposes
sudo apt-get install mc
sudo mc
Case 1: Symbolic links
This is easy to solve:
1. Create an empty folder.
2. Move it to Trash in a usual way (Right Click -> Trash)
3. Move links to that folder
4. Delete that folder in a usual way
Case 2: Files owned by root
gksu nautilus
This kind of nautilus is red like tomato in Mint.
You can change permissions of those files (Right Click -> Properties -> Permissions), and then remove them in a usual way.
If somebody likes Midnight Commander, he can use it too for many purposes
sudo apt-get install mc
sudo mc
Re: Can't empty trash completely
Thanks Dave. I did as you said and did get the option to open as root. I also tried gksu nautilus &. Unfortunately it did not solve my problem. When I try to open trash as root i get "The folder contents could not be displayed. Sorry, could not display all the contents of 'trash.' Operation not supported."pluraldave wrote:Try just right clicking in your home folder. If you do it in the Trash you won't get the option.
If that fails open a terminal and use
Code: Select all
gksu nautilus &
Re: Can't empty trash completely
Hi Igorzwx.igorzwx wrote:I had sometimes similar problems in Ubuntu 6.10
Case 1: Symbolic links
This is easy to solve:
1. Create an empty folder.
2. Move it to Trash in a usual way (Right Click -> Trash)
3. Move links to that folder
4. Delete that folder in a usual way
Case 2: Files owned by root
gksu nautilus
This kind of nautilus is red like tomato in Mint.
You can change permissions of those files (Right Click -> Properties -> Permissions), and then remove them in a usual way.
If somebody likes Midnight Commander, he can use it too for many purposes
sudo apt-get install mc
sudo mc
I tried your empty folder suggestion and it didn't work. When I try to move the problem files into the folder I get the familiar "are you sure you want to permanently delete the file from the trash?" Yes. "Error while deleting." The odd thing is I'm not deleting the file, I'm trying to move it into an empty folder in the trash.
Just tried to change permissions but could not do it. It seems that the "Owner", Gumby, has read and write permission, but the "Group", Gumby, and "Others" have only read permission. Whether that matters or not I have no idea.
Re: Can't empty trash completely
"Whether that matters or not I have no idea."
it does not matter. You permissions are most important
It might be a bug in Ubuntu/Mint
It is an innovation
Trash is now "trash:///"
Type on Terninal
nautilus trash:///
nautilus ~/
In Ubutu 6.10, Trash was "~/.Trash"
EDIT: Trash is not Trash anymore. It now a kind of "pulseaudio"
it does not matter. You permissions are most important
It might be a bug in Ubuntu/Mint
It is an innovation
Trash is now "trash:///"
Type on Terninal
nautilus trash:///
nautilus ~/
In Ubutu 6.10, Trash was "~/.Trash"
EDIT: Trash is not Trash anymore. It now a kind of "pulseaudio"
Last edited by igorzwx on Tue Sep 22, 2009 4:15 pm, edited 1 time in total.
Re: Can't empty trash completely
Watch for file names with spaces, Linux can't move (mv) or cp(copy) them, and might not be even able to see the filesgumby wrote:The odd thing is I'm not deleting the file, I'm trying to move it into an empty folder in the trash.
--you need to escape the file name character that is unusable by the OS or quote it as in 'mv _ MrData.txt'
--notice the space character after the underscore _ M, as well as letter case being significant (capitalized or lower case characters)
Move means copy and delete original
--otherwise how would a move be different from a copy operation
One trick using mv is to mv a file in its original position, a method of renaming a file
Last edited by DrHu on Tue Sep 22, 2009 4:00 pm, edited 3 times in total.
Re: Can't empty trash completely
This should work:
sudo apt-get install mc
Then type on terminal:
EDIT: This is universal command for any boxes:
mc ~/.local/share/Trash/files
*********************************************
mc /home/<your user name>/.local/share/Trash/files
EXAMPLE:
mc /home/igor/.local/share/Trash/files
Navigate to that file in Trash
Click on "Delete"
***************
EDIT: Fantastic! You can open your Trash with Nautilus as ordinary file in this way:
nautilus ~/.local/share/Trash/files
sudo apt-get install mc
Then type on terminal:
EDIT: This is universal command for any boxes:
mc ~/.local/share/Trash/files
*********************************************
mc /home/<your user name>/.local/share/Trash/files
EXAMPLE:
mc /home/igor/.local/share/Trash/files
Navigate to that file in Trash
Click on "Delete"
***************
EDIT: Fantastic! You can open your Trash with Nautilus as ordinary file in this way:
nautilus ~/.local/share/Trash/files
Re: Can't empty trash completely
Hi DrHu !
I believe MC will delete for sure.
It was always helpful in such cases.
Let us see.
Very interesting indeed.
I believe MC will delete for sure.
It was always helpful in such cases.
Let us see.
Very interesting indeed.
Re: Can't empty trash completely
Corrected version:
sudo apt-get install mc
Then type on terminal:
mc ~/.local/share/Trash/files
This will open MC window inside the Terminal.
Navigate to that file in Trash.
Mark that file, which you want to delete.
Simply click on it, and it will be marked.
Click on the button "Delete" on the bottom of the Terminal window.
sudo apt-get install mc
Then type on terminal:
mc ~/.local/share/Trash/files
This will open MC window inside the Terminal.
Navigate to that file in Trash.
Mark that file, which you want to delete.
Simply click on it, and it will be marked.
Click on the button "Delete" on the bottom of the Terminal window.
Re: Can't empty trash completely
Thanks Igor, but I think I've decided to reinstall a new iso of Mint, as I have too many other problems, including bizarre spontaneous shutdowns and restarts. The reinstall should certainly wipe the trash can I would think!
Re: Can't empty trash completely
QUOTE: "including bizarre spontaneous shutdowns and restarts."
It was, perhaps, restarts of Xorg, not of the system.
You have to login once more. Right?
I had this too.
It is the drivers problem.
You should fix your drivers in some way, perhaps.
A new installation makes sense, of course.
It was, perhaps, restarts of Xorg, not of the system.
You have to login once more. Right?
I had this too.
It is the drivers problem.
You should fix your drivers in some way, perhaps.
A new installation makes sense, of course.
Re: Can't empty trash completely
Igor,
MC didn't work. I can't even find the Trash file. It's not there. I looked under local/share. No trash.
But in Nautilus, it's still there. Right now I'm preparing to do a reinstall and having big problems because I'm trying to move a lot of files onto a different partition so I can reformat the first data partition as NTFS, but I don't have room because all the big multi-GB files I deleted are taking up too much space in the TRASH which I can't empty. Until the trash is emptied, the space is still regarded as occupied on the data partition.
I moved more big files to the trash to make room for this move and can't delete them from the trash, also can't delete them permanently.
I'm also worried that the system is behaving so bizarrely that it won't backup my data to DVD accurately. But I have more stuff than I can backup to dvd, which is why I wish I could delete these damn files from the trash.
MC didn't work. I can't even find the Trash file. It's not there. I looked under local/share. No trash.
But in Nautilus, it's still there. Right now I'm preparing to do a reinstall and having big problems because I'm trying to move a lot of files onto a different partition so I can reformat the first data partition as NTFS, but I don't have room because all the big multi-GB files I deleted are taking up too much space in the TRASH which I can't empty. Until the trash is emptied, the space is still regarded as occupied on the data partition.
I moved more big files to the trash to make room for this move and can't delete them from the trash, also can't delete them permanently.
I'm also worried that the system is behaving so bizarrely that it won't backup my data to DVD accurately. But I have more stuff than I can backup to dvd, which is why I wish I could delete these damn files from the trash.