Bug 205854 - Automatic trash cleanup only triggers when a new file is trashed
Summary: Automatic trash cleanup only triggers when a new file is trashed
Status: CONFIRMED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: Trash (show other bugs)
Version: 5.51.0
Platform: Gentoo Packages Unspecified
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords: triaged
: 451483 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-09-01 00:40 UTC by Matt Whitlock
Modified: 2022-03-25 15:52 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Whitlock 2009-09-01 00:40:56 UTC
Version:            (using KDE 4.3.0)
Installed from:    Gentoo Packages

When kio_trash is configured to automatically "Delete files older than" or "Limit to maximum size", the automatic Trash cleaning only occurs when a new file is trashed.  There should be a way to manually invoke the configured Trash cleanup.

Ideas:

1. Expose a DBus method that manually triggers the configured Trash cleanup policy.  A power user could call this method from a nightly cronjob.
2. Add a context menu option to "Clean Up Trash", which would be in addition to the existing "Empty Trash".
3. Schedule a periodic background job that runs the Trash cleanup, so old files in the Trash get deleted per the "Delete files older than" configuration, even if the user is not trashing any additional files.
Comment 1 Nate Graham 2018-04-16 20:23:34 UTC
Is this still the way it works with KDE Frameworks 5.45 or greater?
Comment 2 Andrew Crouthamel 2018-09-28 03:15:30 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Matt Whitlock 2018-10-25 22:53:20 UTC
(In reply to Nate Graham from comment #1)
> Is this still the way it works with KDE Frameworks 5.45 or greater?

This report still applies as of KDE Frameworks 5.51. I have my Trash configured to delete files older than 90 days, yet I still have files with ctimes older than 90 days ago in my ~/.local/share/Trash/files directory. Indeed, I still have files with ctimes older than 97 days ago.

$ find ~/.local/share/Trash/files -type f -ctime +97 | wc -l
2
$ find ~/.local/share/Trash/files -type f -ctime +98 | wc -l
0

If your assertion is that there is a periodic background process that should be cleaning expired files out of the Trash, then could you tell me how often this process is supposed to run? My KDE session has been logged in continuously for the last 14 days (since 11 October), yet evidently no process has cleaned the Trash.
Comment 4 Nate Graham 2018-10-26 02:14:13 UTC
Thanks for the info. #3 from your original three ideas seems like the sanest solution to me.
Comment 5 Matt Whitlock 2018-10-26 19:10:32 UTC
Another data point. I had 3 files in my Trash with ctimes older than 90 days ago. Immediately after I checked this, I moved one file to the Trash (via the context menu in a File Open dialog in a KDE application), and then I immediately checked my Trash again and found 0 files with ctimes older than 90 days ago. So indeed trashing a file triggered the cleanup. It just doesn't trigger spontaneously.
Comment 6 Nate Graham 2022-03-25 15:52:44 UTC
*** Bug 451483 has been marked as a duplicate of this bug. ***