Ubuntu – .Trash-0 and why does it act up every so often

deletehard drivetrash

I noticed that despite deleting several large files from my hard drive my hard drive space wasn't opening up any, and remembered that every once in a while that .Trash-0 folder (no .Trash-1000 in my /home) will hold on to my files for some reason. I was able to take care of the problem with google and running

sudo rm -rf ~/.local/share/Trash-0/*

and

sudo rm -rf ~/.local/share/Trash/*

I was wondering what the function of this folder is. This is only the 2nd time this has happened in my 7 years or so of running ubuntu but I don't know what or why this happens. Usually just emptying the trash folder does its job.

Best Answer

This is the place of your trash folder. Files that you delete with Del in your file manager are stored there. You can bypass the trash by using Shift+Del.

~/.local/share/Trash/*

eg:

enter image description here

$ ls -l ~/.local/share/Trash/
total 436
drwx------ 6 aboettger aboettger  20480 Apr 29 13:56 expunged
drwx------ 2 aboettger aboettger 184320 Mai  6 10:05 files
drwx------ 2 aboettger aboettger 233472 Mai  6 10:05 info

$ ls -l ~/.local/share/Trash/files/
total 564
-rw-rw-r-- 1 aboettger aboettger  35860 Okt 28  2014 libmlt++3_0.9.2+git20141027-1_amd64.deb
-rw-rw-r-- 1 aboettger aboettger 415338 Okt 28  2014 libmlt6_0.9.2+git20141027-1_amd64.deb
-rw-rw-r-- 1 aboettger aboettger 118896 Jun 20  2014 stackapplet_1.5.2-0~201406200416~ubuntu14.10.1_all.deb