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

Little Girl littlergirl at gmail.com
Wed Oct 22 19:50:42 UTC 2025


Hey there,

M. Fioretti wrote:
>Little Girl wrote:

>> I believe that Snap cleans up after itself whenever it updates...
>
>That's not my experience, and I've seen several mention of the same
>issue online, i.e. requests of how to clean up manually old snaps,
>snaps cache etc.

Yeah. Come to think of it, it's been sloppy once in the past for me,
too. Here are my notes from when that happened on how to clean it up ,
with "foo" being used as the example Snap name that we're cleaning up:

Remove snaps
1. Display the snaps on your system: snap list
2. Display all the snaps on your system: snap list --all
3. Check if anything is using the foo snap: snap connections foo
4. Pick one:
     * If you got a response, foo is in use and should not be removed.
     * If you got no response on the connections to foo, foo can
       safely be deleted: sudo snap remove foo

>> grep "Install" /var/log/apt/history.log | awk -v date="$(date
>> --date='-30 days' +%Y-%m-%d)" '{if ($1 >= date) print}'
>> 
>> grep " install " /var/log/dpkg.log | awk -v date="$(date
>> --date='-30 days' +%Y-%m-%d)" '{if ($1 >= date) print}'
>
>Thanks for this and the sudo apt tips, I was already doing many of
>them but not all.

Hopefully, the new one(s) will make some sort of difference.

-- 
Little Girl

There is no spoon.



More information about the ubuntu-users mailing list