best ways to find and remove unneeded packages/snaps and...

Marco Fioretti mfioretti at nexaima.net
Wed Oct 22 05:47:31 UTC 2025


... and everything else in the root partition that is not really necessary? And to do it safely, of course?

Hello everybody.

The less software there is on any computer, the better it is. But how to find and remove everything you don't need, from old logs or kernel versions to temp files to packages that were installed but never actually used?
 
This is a big problem for everybody, but especially for people who, like me, must continuously try new applications, but then stops using most of them after 3/4 months.

There are several Ubuntu-specific answers online to this question, but in my experience the ones that pop up first in searches are not complete. I'd like to have ONE script that I can run say every month and:

1) SAFELY removes from the root partition all the old snaps, logs, kernel sources, caches, whatever (did I miss something?)... that is not actually needed for the regular working of the system

2) tells me which packages where installed in the last N days so I can quickly figure out which ones where just trial installations I could remove because I'm not interested anymore

3) what else should it do? Add your tip

Does anybody have one such script for Ubuntu? If not, how would you write it? 

TIA,
Marco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20251022/c9550a0e/attachment.html>


More information about the ubuntu-users mailing list