I’ve been struggling with a full hard drive for a few years; blaming my use of nodejs/git etc.
I’ve set refresh.retain
to 2 and manually copied and checked a script from https://www.linuxuprising.com/2019/04/how-to-remove-old-snap-versions-to-free.html so that I can run it when my filesystem is full.
Finally I’ve figured out today that /var/lib/snapd/snaps
still holds many older versions of downloaded snaps. I run du -h -x --max-depth=6 -t 1100000000
regularly and write it’s output to a timestampted file, so I can see that this folder has grown linearly from 2.8G at the end of 2020 to 6.2G today.
E.g. snap thinks there’s only one firefox version installed, but there is almost 2GB of Firefox snaps in that folder:
$ snap list --all |grep firef
firefox 119.0.1-1 3358 latest/stable mozilla** -
$ ls -al /var/lib/snapd/snaps/ |grep firef
-rw------- 1 root root 254681088 May 31 11:08 firefox_2710.snap
-rw------- 1 root root 256638976 Jun 9 17:10 firefox_2760.snap
-rw------- 1 root root 256905216 Jul 5 10:57 firefox_2850.snap
-rw------- 1 root root 248733696 Aug 3 19:10 firefox_2952.snap
-rw------- 1 root root 248729600 Aug 16 16:18 firefox_2987.snap
-rw------- 1 root root 248418304 Sep 22 12:53 firefox_3131.snap
-rw------- 1 root root 251994112 Nov 7 14:08 firefox_3290.snap
-rw------- 1 root root 251990016 Nov 8 16:41 firefox_3358.snap
So basically I must have the same problem as this poster: https://superuser.com/questions/1811233/snap-list-all-does-not-show-everyting-in-var-lib-snapd-snaps
I was just going to purchase a new hard drive and glad I haven’t.
Is this on anyone’s radar or am I posting to the wrong forum?