Delete / Purge trash by all users?

itscoffetime

Verified User
Joined
Sep 19, 2019
Messages
92
Is there a way to delete all trash by all users at once? Also, is there a way to limit on config the days trash is maintened?
 
You mean trash mail? Or what kind of trash?

If you login as admin and then under "Administrator settings" you should be able to find an option "Automatically Purge Spambox/Trash data" which you can set to a certain amount of days. I think it's 30 by default, not sure.
 
You mean trash mail? Or what kind of trash?

If you login as admin and then under "Administrator settings" you should be able to find an option "Automatically Purge Spambox/Trash data" which you can set to a certain amount of days. I think it's 30 by default, not sure.
I mean File Managers'
 
I always disable this option just to avoid this
Code:
/usr/local/directadmin/directadmin set fm_to_trash_default 0
service directadmin restart
 
I always disable this option just to avoid this
Code:
/usr/local/directadmin/directadmin set fm_to_trash_default 0
service directadmin restart
But I do not want to disable it, I think it's a good option I just want to know if it's possible to remove them after x time like cPanel does
 
I just want to add my 2 questions: where is this trash saved at all? Per user? Any chance to see whats inside and how much space used?
 
where is this trash saved at all?
New File Manager feature that moves files/folders to the ~/.trash directory when deleted
https://docs.directadmin.com/change...e-to-trash-instead-of-immediate-removal-skins
Any chance to see whats inside and how much space used?

You could do something like du -sch /home/$user/.trash via SSH.

If you'd like to empty .trash for all users in one go, you could use something like find /home/*/.trash -delete
 
Back
Top