4

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.

2

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
1
  • but what purpose does it serve? a vast majority of the time emptying trash from the file manager will delete the files as I want it to, but every few years .Trash-0 seems to retain the files despite emptying trash.
    – user133017
    May 7 '15 at 0:06
1

Whenever you mount an external disk, a trash-* directory will be created in the "root" directory where files are moved to if deleted from the GUI, like the trash on your desktop.

This is to improve file recovery for external drives. (E.g. USB sticks or HDDs)

1
  • That's interesting - is there a reason for why it seems to hold on to deleted files every few years despite emptying trash? I do delete my files via GUI and empty trash through nautilus, but every few years an issue like this pops up.
    – user133017
    May 7 '15 at 0:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.