<SOLVED> Change trash configuration options on mint

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
tzell
Level 3
Level 3
Posts: 126
Joined: Wed Aug 03, 2022 4:56 pm

<SOLVED> Change trash configuration options on mint

Post by tzell »

Hi forum,
Is there a way to change 'Trash' options.

Examples of what I'd like to achieve:

- only move files smaller than X to trash (so big files can be deleted directly without trash).
- move trash location to a different disk (spinning HDD disk), so trash won't be stored on an SSD.
- Auto empty files older than X days.
Last edited by LockBot on Sun Feb 12, 2023 11:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Dan-cer
Level 6
Level 6
Posts: 1097
Joined: Fri Jul 29, 2022 4:56 pm
Location: Germany, Lower Saxony

Re: Change trash configuration options on mint

Post by Dan-cer »

You can enable the provision of "Delete directly" command in the Nemo (File Manager) settings.

There is not only one recycle bin. Every partition and every user has one. Basically, it should be possible to change the path to the user recycle bin. I'm not sure. Maybe do a search yourself.
How you get better results when searching for yourself.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Change trash configuration options on mint

Post by Cosmo. »

#1 and #2 are not possible. #2 would be a disaster, because now every delete command would result in a copy process instead of moving.

For #3 you can install the package trash-cli. Beside other things it contains the command trash-empty. If you use it with a value (e.g. trash-empty 30) all content in the trash, which is older than 30 days, gets deleted. Place this command into the autostart settings and the deletion happens every day, when you log in.

Note: The command cleans the complete trash, if you do not add a value to the command.
Petermint
Level 9
Level 9
Posts: 2981
Joined: Tue Feb 16, 2016 3:12 am

Re: Change trash configuration options on mint

Post by Petermint »

Trash works best when on the same partition, otherwise the system does not know where to restore if there is any change of locations, a big issue with USB attached storage. If you have an SSD and a spinning disk, you could move less used directories to the spinning disk. You get more room for trash on the SSD and the other stuff has its trash next to the original files. For example, move Music or Videos.
User avatar
tzell
Level 3
Level 3
Posts: 126
Joined: Wed Aug 03, 2022 4:56 pm

Re: Change trash configuration options on mint

Post by tzell »

Cosmo. wrote: Fri Aug 12, 2022 7:30 am #1 and #2 are not possible. #2 would be a disaster, because now every delete command would result in a copy process instead of moving.

For #3 you can install the package trash-cli. Beside other things it contains the command trash-empty. If you use it with a value (e.g. trash-empty 30) all content in the trash, which is older than 30 days, gets deleted. Place this command into the autostart settings and the deletion happens every day, when you log in.

Note: The command cleans the complete trash, if you do not add a value to the command.
Thank you I'll use the trash-cli.
rickNS
Level 9
Level 9
Posts: 2968
Joined: Tue Jan 25, 2011 11:59 pm

Re: <SOLVED> Change trash configuration options on mint

Post by rickNS »

IMO the "trash" can was a windows inception, that in concept is a VERY BAD idea. (leading to this particularly bad practice)
"Trash Can" is NOT a backup plan. Relying on it is a BAD idea.
The "delete" button, key, command whatever should mean exactly that...Delete. Expecting the "trash Can" to SYA in some emergency is eventually going to lead to disappointment.

Delete, wherever you look it up means, delete...Meaning = verb to remove or obliterate (written or printed matter), NOT saved somewhere else.

So, again IMO,
Rule # 1, DO NOT Delete stuff you "might" need later. (put it somewhere else...)
Rule # 2, DO NOT expect Trash can to SYA. In file browser do include the "include a delete command that bypasses Trash", it will save you headaches later. I could show a recent example.

Again "Trash Can" is not a backup plan.
Mint 20.0, and 21.0 MATE on Thinkpads, 3 X T420, T450, T470, and X200
Petermint
Level 9
Level 9
Posts: 2981
Joined: Tue Feb 16, 2016 3:12 am

Re: <SOLVED> Change trash configuration options on mint

Post by Petermint »

The trash can, a Xerox invention, has saved me from a wrong file selection when using the touch pad as they are so inaccurate. I never have the problem with mice.

Xerox invented the Windows style GUI licensed by Microsoft. Apple pirated a copy then sued Microsoft for "copying" Apple. Apple lost.

What would help is the various operating systems telling you what they do. The funny Linux lost+found is confusing plus it is not used. Perhaps a daily backup script could run Backintime then empty the trash.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: <SOLVED> Change trash configuration options on mint

Post by Cosmo. »

lost+found gets used, if a file system repair needs to save files or fragments of files. As long as there is no damaged file system there is nothing, what would have to get stored there. Be happy.
Locked

Return to “Beginner Questions”