-1

There is something really bad in Debian based systems and that is you can't easily remove junks like removed apps, apps cache, browser cache and other junks.

The most used command to clean junk is : sudo apt clean But that is not really helpful and does not clean all junks.

Is there anyone with a simple solution like a script that goes and remove junk files?

Ch0l0mbe
  • 25
  • 5

1 Answers1

1

How to clean out what you explicitly have stated: (I'm not sure what you mean by "App cache" and "Other junk".)

Data from removed .deb packages

Run this to simulate:

sudo apt purge --dry-run ?config-files

Remove the --dry-run option to actually fire the purge command.

Snapshots from removed snap packages

Run this to see saved snapshots:

snap saved

Run this to remove a particular snapshot

sudo snap forget #

Where # is the number of the snapshot.

See here for more info.

Clear browser cache

This is done from your chosen webbrowser, typically by going to:

  • "Settings" -> "Privacy" -> "Clear Data" (Or something similar)
Artur Meinild
  • 31,035