Ubuntu – Trash folder
It was today that I encountered a problem that I have never faced before. Months back I had “Moved to Trash”ed an application and it was lying in the trash until today when it caught my attention. When I tried emptying the trash folder, all other files except an application got deleted. My login id did not have permission to delete these files from Trash. Weird is what you are thinking of now because how in the first place that application got deleted with the same login id where it got moved to trash ? This application was deleted as a pseudo root using sudo command. This is not the problem yet. When this application was deleted, it was moved to Trash but it also carried the same permissions as it was installed which means my login id has no write permission. Hence, not getting deleted from Trash. How to delete these files from Trash ? After doing some search from $HOME folder, I found the local directory that has all the deleted files.
$HOME/.local/share/Trash is the folder that represents the Trash. This directory has a couple of sub-directories, namely info and files. Later is the directory that has the actual files that were deleted while the directory name “info” is a metadata of the deleted files.
If deleting files from Trash fails because of permission, just change the permission of the files in $HOME/.local/share/Trash/files directory.
Happy trashing !