Can't empty a file from Trash

I am unable to delete the Kali Linux iso from trash. I click on Empty Trash and yet it still remains. Any Ideas?

when I open trash and try to delete permanently:
Screenshot at 2022-12-13 20-26-56

Hello mickee

A quick fix you could try:

  • Launch Caja from a terminal with sudo, i.e. "sudo caja".
  • Then empty the "trash".
  • Then close Caja.

Thanks @alpinejohn. sorry that did not work. It also remains after reboot. In the actual trash folder it does not appear in the files folder. (/home/mickee/.local/share/Trash)

Hi tried here on UM22.04 and empty trash works (tried with UM22.04.1 iso and LinuxMint 21 iso.) Image shows both trash folders and as you say it does not end up in the .local/share folder. Also tried with both iso's to just drag out of the Trash folder to desktop and that method also works here. Maybe if that works could try think it is shift-delete if you don't have it set up in Control Center / Personal / File Management


Thanks for your reply @mendy. I have my Caja preferences set as yours. I tried Shift + Delete and it popped same error as when trying to empty the trash. I am thinking it really doesn't exist at all. The Trash icon does show there is something in the trash and can see it when the trash is opened, but it doesn't actually appear in the actual trash folder. I checked /home and also the trash for root, just in case it was needing to be deleted by root. It is not in either folder.

This may sound goofy, but have you logged out and in again? Or rebooted your computer? Yes, that's a Microsoft solution, but I've encountered times when Caja leaves a "ghost" image on my computer, and the only way I've been able to clear it is to log out/in. Or reboot.

Thanks @OldStrummer I have rebooted but not logged out of session. I will try that and report back.

Taking into consideration all that has been discussed in this thread, I have one more suggestion.

  • Find the detachable storage medium (e.g. USB-stick, external hdd or ssd) that the .iso file was deleted from and mount it again onto your computer.
  • Now empty the trash (it should work).
  • Remove the detachable storage medium.

it was originally in /home/VirtualMachines

The state of your Trash is kept by gvfs (gnome virtual file system)
It is possible that something corrupted it.
You could try to empty the gvfs metadata directory:

rm $HOME/.local/share/gvfs-metadata/*

Then logout/login (or reboot)

3 Likes

@tkn Thanks! I tried it and the 'file' is still in the trash

Fixed with:

sudo apt install trash-cli && trash-empty

2 Likes