Empty Recycle Bin

Removing Deleted Files from your Trash

Have you ever deleted files to your "Recycle Bin" or if you prefer "Trash" only to find you cannot use "Empty Deleted Items" observing that permissions prevent you from deleting all the files or folders your bin contains.

Deleted Items  Empty Deleted Items

Now normally you will only need to delete items that are owned by you ie. you created them, so you can delete them when you finished with that item or file, when you can not delete them then there is probably a very good reason why you can't. If however you are absolutely sure you do not need these folder(s), files or file, this task can prove to be very frustrating especially when there seems no additional way to remove them, the answer is of course is to switch to super user "root" .

Browse your file system in "/home/user" , file system origin "/" or even user "/root" and you may be hard pushed to locate folders called anything like Deleted Items, Trash or Recycle Bin. In Ubuntu locating the Trash folder is again quite difficult but it does at least exist. I used the following command as I did not know the actual folder name I needed to locate "Trash" . Open a new Terminal in Ubuntu this is located in your Accessories folder and type the following command, substituting freeswitch with a file or folder in your Trash you cannot get rid of.

#> find / -name freeswitch -print

The "freeswitch" element was the folder I was on this occasion looking for as this was the folder I could not purge from "Trash" folder as normal user. The above command returned these values:

/etc/init.d/freeswitch
/etc/default/freeswitch
/usr/local/freeswitch
/usr/local/freeswitch/bin/freeswitch
/home/delboy/.local/share/Trash/files/freeswitch
/home/delboy/.local/share/Trash/files/freeswitch/freeswitch-1.0.2/.libs/freeswitch

As you can see I do not need to delete everything with freeswitch only what is in Trash folder which in actual fact was in my home directory all along. These files are located in the last two lines from those displayed above, therefore we could recursively delete all files and folders located in the following location as we are using sudo we need to be very careful of the commands executed:

#> sudo rm -r .local/share/Trash/files/freeswitch

Enter your password to confirm your authorisation for removal of these files and folders. This method should be successful for all removal of files and folders. Switching user to that of "root" for file maintenance is risky and should only performed if absolutely necessary.