Header Ads

Solution: Permission Denied to Delete Files in Trash Folder in Linux


Recently, I encountered problem deleting files in trash folder in Ubuntu. There was a folder in my trash folder that I was unable to delete permanently because when I tried to do so, I met with a message saying : I don't have permission to delete this folder.

So I thought to delete this folder using the "sudo" command and for that I opened terminal window, but I was unable to find my trash folder anywhere on my computer. What is the path of trash folder on Linux ? I searched for it in the File System, but got nothing.

After working out a bit I came up with the solution as mentioned below :

STEPS :

(1) Trash folder in Linux is located @ /home/{your username}/.local/share/Trash

(2) Navigate to that folder using command :
cd /home/{your username}/.local/share/Trash

( {your username} is the user with which you have logged in )

(3) Run the following command :
sudo rm -r *
(4) All folders and files in trash would be deleted.

Hope this tutorial works for you, if not drop your problem as comment.

2 comments:

  1. I have been using LongPath tool for past few months. It works fine with unlocking and modifying system restricted files and folders.

    http://longpathtool.com/Downloads.html

    ReplyDelete
  2. Thanks for this post! this quick solution helped to solve my problem too!

    ReplyDelete