PSA: Remember to also check hidden directories you don't even know about for waste of space


Apparently, Prism Launcher chose to adhere to the idiotic principle of the hidden "trashbin", .Trash-$(uid), invented by Ubuntu. Even though it's based on QT. This can't be disabled. It accumulated 139 GB of literal Trash, fully replaceable, over time. Just ... why?
There's even an open issue about this, for over a year, referenced multiple times.
I guess I have another point on my agenda.
in reply to Lucy :3

the hidden "trashbin", .Trash-$(uid), invented by Ubuntu


This isn't some “idiotic principle invented by Ubuntu”, it just follows the freedesktop.org Trash specification. For many users, it can be really beneficial, see also the spec's introduction:

An ability to recover accidentally deleted files has become the de facto standard for today's desktop user experience.

Users do not expect that anything they delete is permanently gone. Instead, they are used to a “Trash can” metaphor. A deleted document ends up in a “Trash can”, and stays there at least for some time — until the can is manually or automatically cleaned.


Whether an application like Prism Launcher should use the trash can or delete the files directly is an entirely different question.

This entry was edited (5 months ago)
in reply to cmnybo

To explain it a bit further: when you move a file/directory on the same mount point, moving the file/directory is essentially just a rename operation, which doesn't involve copying the data itself and is a very cheap operation. If you move a file/directory across mount points, you need to (recursively) copy the file/directory, copy file metadata and (recursively) delete the old file/directory, which is slow and error-prone.
in reply to Lucy :3

I use command trash-empty to empty all trashcan of all the users, after each system update. It's a non standard program, but most likely available in your distributions repository: github.com/andreafrancia/trash… And my alias/function will show each file that is about being deleted (just put it in .bashrc, if you have installed trash-cli, which includes trash-empty):

::: spoiler old function (click to expand)

empty() {
    echo "Files to delete:"
    trash-empty -f --dry-run |
        awk '{print $3}' |
        grep -vF '/info/'
    echo
    trash-empty
}

:::

Edit: After I posted I just realized there is a more straightforward way of doing it:

New and more simple alias:

alias empty='trash-empty -f --dry-run ; trash-empty'

This searches all trash cans, lists all files it has found to be deleted, then lists all directories it looked under and then asks if you want really delete. With trash-empty -f it deletes without asking.
This entry was edited (5 months ago)