What puts files in ~/.local/share/Trash

Asked by Jim Hutchinson

I just discovered about 20GB of music files that I deleted a while ago in this dir ~/.local/share/Trash. What is the purpose of this dir and why would these files end up there? It seems to be the cause of my long login delay. I seem to have finally managed to delete these files but I don't why they ended up there to begin with. I also have a ~/.Trash dir where things usually go when I delete them.

Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Matt Mossholder
Solved:
Last query:
Last reply:
Revision history for this message
Matt Mossholder (matt-mossholder) said :
#1

Jim, I can't tell you which app put the files there, but I can tell you why it did: XDG.

XDG is a set of desktop standards from Freedesktop.org that covers file and directory locations for desktop environments. Apps that follow the standards happen to put most of their files in ~/.local.

Here's a link to the spec:
http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html

   Regards,
              --Matt

Revision history for this message
Jim Hutchinson (jphutch) said :
#2

Thanks for the info. If I understand, you are saying that I must have chose to delete these files using an app that use XDG. I think I might have been using Rythmbox but I could have been doing the deleting from Nautilus. I not real certain exactly how I deleted them. In any case, instead of going to ~/.Trash they went to ~/.local/share/Trash. So that is normal behavior for at least some apps? Seems like it would make more sense for all deleted items, no matter how they are deleted, to go to ~/.Trash. As it was, I had 20gigs of stuff that I thought I deleted but didn't and found them basically by accident.

Revision history for this message
Best Matt Mossholder (matt-mossholder) said :
#3

Jim,
     You're reading me loud and clear. I just deleted several files with Rhythmbox, and I'm not getting files in ~/.local/share/Trash, so it is probably another application that put them there.

    I agree it makes more sense to put all the trash in one can, however, what has happened here, is, people were putting it all over, and then the freedesktop.org people said "Hey, look, we have a standard now... everyone switch!", and the packages are still in the middle of transitioning, which most apps still using their old trash locations.

        --Matt

Revision history for this message
Jim Hutchinson (jphutch) said :
#4

Thanks Matt Mossholder, that solved my question.

Revision history for this message
Jim Hutchinson (jphutch) said :
#5

Well, I guess that answers my question. Thanks for the info. I guess it's one of those "it depends" kind of things. I'd still like to know how so much stuff got in there and why emptying the trash doesn't empty it, but I see that it is "normal" if unexpected.

Thanks.

Revision history for this message
nebajoth (nebajoth) said :
#6

We should consider using UnionFS to merge the two into ~/.Trash/ (since it is more intuitive for people, and thus the moar "Ubuntu" way).

Read moar at: http://www.filesystems.org/project-unionfs.html

Revision history for this message
sam.watkins (swatkins) said :
#7

(emule running in) wine does this. Possibly the same thing that happened with the OP's music files. As for unionfs, we could instead consider using a symlink which would be a lot simpler.