20

I delete files via Nautilus. I then empty the Trash. It shows as empty. However, ~/.local/share/Trash contains 1.5G of stuff. I have a small SSD and so this is highly annoying. Here's what ~/.local/share/Trash shows now.

mfisch@caprica:~/.local/share/Trash$ du -h .
4.0K    ./expunged
988M    ./files/binary-precise-armhf-tar-20130123-6.tar/casper
8.0K    ./files/binary-precise-armhf-tar-20130123-6.tar/.disk
12K ./files/binary-precise-armhf-tar-20130123-6.tar/install
988M    ./files/binary-precise-armhf-tar-20130123-6.tar
1.5G    ./files
24K ./info
1.5G    .

Why aren't these files removed? Will they be purged later, perhaps by cron?

Edits:

  • I'm already using a fully updated 12.10 image
  • These files were in ~/Downloads, on my SSD drive, they were not on another device.

The permissions look fine. And this morning I have 4 more files in here that never got expunged when I emptied the Trash:

ls -rl ~/.local/share/Trash
total 12
drwx------ 2 mfisch mfisch 4096 Jan 23 20:15 info
drwx------ 3 mfisch mfisch 4096 Jan 23 20:15 files
drwx------ 2 mfisch mfisch 4096 Jan 22 14:01 expunged

ls -rl ~/.local/share/Trash/files/
-rw-rw-r-- 1 mfisch mfisch 313935076 Jan 23 12:33 maguro.img
-rw-rw-r-- 1 mfisch mfisch   4679680 Jan 23 12:30 maguro-boot.img
-rw-rw-r-- 1 mfisch mfisch 179398453 Jan 23 12:35 grouper.img.gz
-rw-rw-r-- 1 mfisch mfisch   5244928 Jan 23 12:33 grouper-boot.img
drwxr-xr-x 5 mfisch mfisch      4096 Jan 23 16:05 binary-precise-armhf-tar-20130123-6.tar

So here's an update. I rm -rf'd .local/share/Trash last week. It didn't come back until I rebooted a couple days later. Since then, it's been well behaved. So I think this means that this is a bug rather than a useful question. I'll file a bug if it happens again because I should be able to trust that trash is doing what it is supposed to do. Here's what it looks like now:

mfisch@caprica:~/.local/share/Trash$ du .
4   ./expunged
4   ./files
4   ./info
16  .
3
  • OP flagged that this is a bug and requested closure.
    – fossfreedom
    Feb 5, 2013 at 23:08
  • 2
    Could someone please provide a link to this bug?
    – user25656
    Mar 16, 2013 at 3:32
  • // , Where is the bug? Is it in Launchpad? Mar 23, 2016 at 20:27

2 Answers 2

0

Did you enable TRIM on your SSD, if not it would be good idea to do so. TRIM improves your computer's compatibility with the Linux OS and it also increases the SSD's lifespan.

Here's how you do it.

1
  • I run it every few weeks, but that won't solve Trash not working.
    – mfisch
    Feb 2, 2013 at 5:14
0

"Trash" is sort of superimposed into Linux because our file systems don't work like NTFS which people expect coming from Windows. Personally, I think best practice is to avoid using a garbage cache and things are either all the way there or all the way gone.

In your situation, if I wanted to keep using it, I would make a bash script on my desktop to the effect of:

rm -rf "path to trash folder"

and run it after I "emptied" the trash.

1
  • 1
    In other words, it doesn't work and will never work. I have no idea then why it was added.
    – mfisch
    Feb 1, 2013 at 19:14

Not the answer you're looking for? Browse other questions tagged .