Add an option to the "delete" action of CleanerML to ensure files are not in use before removing them
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
BleachBit |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Some files should not be deleted, or even worse shredded, if they are being used by other programs, a common example is KDE icon caches, which are mmap-ed by several processes. This causes many bug reports of users suddenly getting his window manager and all its applications to crash after running BleachBit. See https:/
I think it would help to be able to mark actions like '<action command="delete" search="glob" path="~
I put together a quick script based on lsof: https:/
"""
# Can be removed
bookmarkrunnerf
bookmarkrunnerf
bookmarkrunnerf
choqok-
kdenlive-
ksycoca4stamp
plasma-
plasma-
plasma-
plasma-
plasma_
plasma_
# Don't touch!
icon-cache.kcache
ksycoca4
plasma_theme_Dynamo Plasma_v1.0.kcache
plasma_
"""
Having a similar check in BleachBit would be great.
Changed in bleachbit: | |
importance: | Undecided → Wishlist |
This is a good idea. For cleaning /tmp/ some files, including some specific to KDE, are whitelisted, but your approach is more general.
To avoid the performance penalty, the flag you suggest would usually be disabled.
My main concern then is if there are any exceptions. Have you tried deleting the KDE cache files based on "lsof" and checking for negative side effects?