MoscaDotTo / Winapp2

A database of extended cleaning routines for popular Windows PC based maintenance software.
Creative Commons Attribution Share Alike 4.0 International
763 stars 85 forks source link

improvements for Firefox cache cleaning #912

Closed FuccDucc closed 1 year ago

FuccDucc commented 1 year ago

Winapp2 comes really close to cleaning everything that can be considered a cache, so let's make it perfect by adding the below entries:

C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder]\datareporting\glean > All Subfolders & contents C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder]\security_state > All contents C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder]\datareporting > All .json files C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] > cert9.db C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] > ClientAuthRememberList.txt C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] > containers.json C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] > cookies.sqlite C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] > credentialstate.sqlite C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] > ExperimentStoreData.json C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] > favicons.sqlite C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] > key4.db C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] > permissions.sqlite C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] > targeting.snapshot.json C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] > times.json C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] > xulstore.json

C:\Users[USER]\AppData\Local\Mozilla\Firefox\Profiles[profile id folder]\startupCache > All contents C:\Users[USER]\AppData\Local\Mozilla\Firefox\Profiles[profile id folder] > ShutdownDuration.json (Temporary file by nature, may be used for tracking)

Each of these files get regenerated on launch, and immediately populated with A) user based configuration values or B) the latest certs data from servers it contacts, etc. I didn't see any feature or config breakage, this is my personal deleting routine (in file explorer) after running Winapp2 for quite a while. Hence they are clearly temporary files & caches.

CSGalloway commented 1 year ago

Was this added to the recent updates?

Charles S Galloway

On Wed, Feb 15, 2023 at 5:08 AM FuccDucc @.***> wrote:

Winapp2 comes really close to cleaning everything that can be considered a cache, so let's make it perfect by adding the below entries:

C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder]\datareporting\glean > All Subfolders & contents C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder]\security_state > All contents C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder]\datareporting > All .json files C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder]

cert9.db C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] ClientAuthRememberList.txt C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] containers.json C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] cookies.sqlite C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] credentialstate.sqlite C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] ExperimentStoreData.json C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] favicons.sqlite C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] key4.db C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] permissions.sqlite C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] targeting.snapshot.json C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] times.json C:\Users[USER]\AppData\Roaming\Mozilla\Firefox\Profiles[profile id folder] xulstore.json

Each of these files get regenerated on launch, or on contacting cert servers (populated with the freshest data), etc. I didn't see any feature or config breakage, this is my personal manual deleting routine (in file explorer) after running Winapp2 for quite a while. Hence they are clearly temporary files & caches.

— Reply to this email directly, view it on GitHub https://github.com/MoscaDotTo/Winapp2/issues/912, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFAX6VRMP7JCCOF4RGV75DLWXSTJDANCNFSM6AAAAAAU4UNRUE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

MoscaDotTo commented 1 year ago

I'm currently working on this :)

MoscaDotTo commented 1 year ago

FWIW, deleting containers.json definitely breaks firefox containers if you use them, so some of this may necessarily wind up in separate entries

APMichael commented 1 year ago

Just my humble opinion:

One should always know exactly what is stored in files before calling them cache and suggesting to delete them.

For example, the file "cert9.db" is used for "Safe Browsing", the file "key4.db" is used for storing passwords respectively "Auto-Login". Some users surely want to use the cookie management of CCleaner, so deleting the file "cookies.sqlite" is not always useful. Also many users don't want to delete the icons of their bookmarks, which are stored in the file "favicons.sqlite". The file "permissions.sqlite" stores "Site Preferences" , which some people also keep...

Therefore, please do not simply mark files that are regenerated during a restart as cache. If it is not quite clear what is stored in a file, then it should not be added to Winapp2.ini either.

FuccDucc commented 1 year ago

For example, the file "cert9.db" is used for "Safe Browsing", the file "key4.db" is used for storing passwords respectively "Auto-Login". Some users surely want to use the cookie management of CCleaner, so deleting the file "cookies.sqlite" is not always useful. Also many users don't want to delete the icons of their bookmarks, which are stored in the file "favicons.sqlite". The file "permissions.sqlite" stores "Site Preferences" , which some people also keep...

cert9.db: what gets pulled from Firefox/safe browsing/cert servers (as sort of a dynamic block/allow/legitimate certs list) is the definition of a cache, if it pulls the latest valid data into a regenerated file on startup, as it does. Not trusting software to always keep it fresh and clean is the point for users that like to clear caches, so the purpose is served.

key4.db: yes, individual users have different desires for the cleaning routine. Instead of shooting it down, it can be added in a passwords/auto login cleaning category. To say it's missing, i should state that the files in this issue's overview (OP) remained despite selecting all possible cleaning categories, both in CCleaner default and Winapp2 entries (i was even using the overhaul PR's version of Winapp2 at the time of testing and reviewing it).

cookies.sqlite: just add it, similarly to the above, to its respective category with proper naming, so users at all time have full cookies clearing as a choice. There is already a "Firefox Cookies" category in Winapp2, but it doesn't get rid of this yet, so the cookie management GUI is a non-argument.. its always up to the user to choose between that tool and just getting rid of all cookies at once per the cleaning category.

favicons.sqlite: Bookmark icons get regenerated, timely repairing them being displayed after a clearing. This is the definition of a cache, similar to thumbnails.. again a point where not to trust software to keep it fresh and clean at all times.

@APMichael

APMichael commented 1 year ago

... its always up to the user to choose ...

That's exactly the point I was trying to make. That's why I meant that one can't simply call everything Firefox cache in general. If such files get their own entries, surely no one has anything against it. (However, in your first post it sounded like this could just be added to the entry [Firefox Caches *].)

Right, the separate entry [Firefox Cookies *] still exists and it should also delete the "cookies.sqlite": FileKey5=%AppData%\Mozilla\*\Profiles\*|cookies*

Firefox unfortunately restores favicons only after visiting the bookmarked website. (And how users react to deleted favicons, you can currently read in the CCleaner forum.)

FuccDucc commented 1 year ago

I found new cache types to include:

C:\Users[USER]\AppData\Local\Mozilla\Firefox\Profiles[profile id folder]\startupCache > All contents

Example of what's in there: scriptCache-child-current.bin scriptCache-current.bin startupCache.8.little urlCache.bin urlCache-current.bin webext.sc.lz4

C:\Users[USER]\AppData\Local\Mozilla\Firefox\Profiles[profile id folder] > ShutdownDuration.json (Temporary file by nature, may be used for tracking)

will add to issue main

APMichael commented 1 year ago

I found new cache types to include:

C:\Users\[USER]\AppData\Local\Mozilla\Firefox\Profiles\[profile id folder]\startupCache > All contents ... C:\Users\[USER]\AppData\Local\Mozilla\Firefox\Profiles\[profile id folder] > ShutdownDuration.json (Temporary file by nature, may be used for tracking) ...

Just for your information, this is already being cleaned up.


; Version: 230316

[Firefox Caches *]
FileKey42=%LocalAppData%\Mozilla\*\Profiles\*\*cache*|*|REMOVESELF

[Firefox Telemetry *]
FileKey44=%LocalAppData%\Mozilla\*\Profiles\*|ShutdownDuration.*
MoscaDotTo commented 1 year ago

check against the most recent update and re-file if necessary :)