154
submitted 1 month ago by 30p87@feddit.org to c/linux@lemmy.ml

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.

top 39 comments
sorted by: hot top controversial new old
[-] d_k_bo@feddit.org 91 points 1 month ago* (last edited 1 month ago)

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.

[-] lurch@sh.itjust.works 39 points 1 month ago

and proper trashing is actually really helpful, so you can trash files on encrypted volumes without leaking them to a unencrypted trash dir.

trashing saves time and has a more continous workflow, as you don't have to confirm each file to prevent accidents, because you can restore if you deleted too much

[-] theshatterstone54@feddit.uk 13 points 1 month ago

But why wouldn't they use .local/share/Trash instead? Isn't that supposed to be a unified directory for that very purpose?

[-] cmnybo@discuss.tchncs.de 43 points 1 month ago

Because that would take a long time if you deleted a large file in another partition or drive. You could also end up not having enough space to move the file to trash and if the trash directory is on an SSD, it would add a lot of unnecessary wear to it.

[-] d_k_bo@feddit.org 11 points 1 month ago

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.

[-] dadarobot@lemmy.sdf.org 38 points 1 month ago

I use ncdu. It shows what folders/files are actually eating up all your space.

[-] mizuki@lemmy.blahaj.zone 2 points 1 month ago

I was about to suggest this. It comes with a nice TUI that sorts by highest disk usage.

[-] InFerNo@lemmy.ml 2 points 1 month ago

Neat! I kept using du and df and work my way to the culprit. On PC's with GNOME I use baobab.

[-] sunstoned@lemmus.org 24 points 1 month ago* (last edited 1 month ago)

I'm more of a dust man, myself. It runs recursively so it's easy to pinpoint the culprit.

[Image source: the project's README]

[-] DrDystopia@lemy.lol 24 points 1 month ago

Doesn't people use a disk usage scanner every once in a while to find out if there's something hogging space?

[-] lnxtx@feddit.nl 13 points 1 month ago

If you have 4 TB disk, you don't care until it is getting full.

[-] MonkderVierte@lemmy.ml 6 points 1 month ago* (last edited 1 month ago)

I do, because it is the same with a 4 TB disk and 100 GB games as it is with a 256 GB disk and png's & office stuff.

[-] DrDystopia@lemy.lol 5 points 1 month ago

I have several 4 and 8 TB disks filled up with various stuff just waiting to be cleaned up. Why do you think I'm preaching about storage space management?

My dual 10's are starting to fill up because I don't move stuff off-site as I should. And then reclaiming space through disk analyser and freeing up reserved space is a life saver.

[-] 30p87@feddit.org 5 points 1 month ago

I do, except I always used du -hs *, which does not include hidden (.-Prefixed) files. So a double trap.

[-] rxxrc@lemmy.ml 8 points 1 month ago

shopt -s dotglob will make * include .dotfiles.

[-] exu@feditown.com 21 points 1 month ago

Your desktop environment should have settings for when to clear the trash. You can also use autotrash to clear it automatically.

[-] 30p87@feddit.org 16 points 1 month ago

The Problem is: I don't have a DE, and therefore didn't realize programs would still try to use trashbins.

[-] thingsiplay@beehaw.org 19 points 1 month ago* (last edited 1 month ago)

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: https://github.com/andreafrancia/trash-cli 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):

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.

[-] viq@social.hackerspace.pl 12 points 1 month ago

@30p87 @hyperreal ncdu is great for that

[-] ZeroHora@lemmy.ml 9 points 1 month ago

All .Trash-1000 files appears in your trashbin no? At least is how is working for me.

[-] mexicancartel@lemmy.dbzer0.com 8 points 1 month ago
[-] MonkderVierte@lemmy.ml 8 points 1 month ago

Isn't it common that file managers have a trash bin? Thunar does.

[-] eldavi@lemmy.ml 5 points 1 month ago

I did this yesterday while trying to make a backup before formatting and then updating my work rig and I'm SO GLAD that the decades have taught me to take knee-jerk/automatic actions that forces me to make entire volume backups; otherwise this last month of work life would have been AWFUL!!!

[-] prole@lemmy.blahaj.zone 2 points 1 month ago* (last edited 1 month ago)

You can easily set it up to do this automatically with something like timeshift...

I recently switched to an Atomic distro (Bazzite), and they have made it so easy to rollback to previous commits without any additional software.

[-] eldavi@lemmy.ml 1 points 1 month ago* (last edited 1 month ago)

I use rsync on a cron job and it do it automatically every time i add a new drive or volume.

[-] nanook@friendica.eskimo.com 4 points 1 month ago

Hard delete used to be in the drop-down along with move to Trash, since I rarely accidentally delete things and when I do I have backups, I much preferred that arrangement.

[-] Ephera@lemmy.ml 5 points 1 month ago

Depending on your file manager, you may be able to hold Shift while triggering the delete to get a hard delete.

Shift+Del is pretty much standardized as the keyboard shortcut. And here on KDE, I can hold Shift while clicking the "Move to Trash" menu entry, too (well, it actually replaces the menu entry with one for permanent deletion, but that's effectively the same).

[-] troyunrau@lemmy.ca 2 points 1 month ago
[-] nanook@friendica.eskimo.com 2 points 1 month ago

@troyunrau In mate it's a drop down menu not a key.

[-] troyunrau@lemmy.ca 3 points 1 month ago

I don't use mate, but assuming that it has a file manager and that file manager has hotkeys that conform to the muscle memory that is built using other file managers... Try it and see what happens?

[-] nanook@friendica.eskimo.com 2 points 1 month ago

@troyunrau Ok did try, delete + center button mouse click does remove the file however since the only delete on my keyboard is right side and I'm right handed handed and and thus also use the mouse right hand, not terribly useful.

[-] troyunrau@lemmy.ca 1 points 1 month ago

Well, that's on mate then. In KDE you could remap to a combo of your choice with ease

[-] nanook@friendica.eskimo.com 2 points 1 month ago

@troyunrau KDE wastes too much screen space and too much of my time. It's pretty but inefficient.

[-] troyunrau@lemmy.ca 1 points 1 month ago

All I'm hearing is complaining. It's open source. Fix mate then so it does what you want.

[-] nanook@friendica.eskimo.com 2 points 1 month ago

@troyunrau Not complaining, just explaining my choice for a particular desktop and preferences. I realize it's open source and I realize I have the source so if it's severe enough I have the option of modifying it. If only I had infinite time.

[-] tkk13909@sopuli.xyz 4 points 1 month ago

This is why I use gdu on servers

[-] nanook@friendica.eskimo.com 3 points 1 month ago

On servers I primarily use a terminal, only for things like virt-manager do I ever fire up a desktop so on servers mostly moot.

[-] xia@lemmy.sdf.org 2 points 1 month ago* (last edited 1 month ago)

Maybe checkout kdirstat (gui) and ncdu (tui)

this post was submitted on 11 Nov 2024
154 points (91.4% liked)

Linux

48721 readers
1378 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS