No disk space recovered after remove old snaps version, any idea why?

snap list showed that I was having old versions of multiple snap apps on my system, so I figured it’d be nice to recover some disk space by removing old ones since I didn’t need them no more.

But, after I removed them using snap remove xxx --revision=xxx, my free disk space did’t increase as I expected, despite that app folders at /snap/xxx and snap files at /var/lib/snapd/snaps were all gone. Also, du /var/lib/snapd/snaps showed that this folder’s size actually decreased after removing snaps.

Does anyone have any idea why this happened?

PS: all of my snap apps only had two revisions before removing, and I was trying to get rid of the sole old ones and leave only active ones.

Snaps are created to be able to transparently go back to the former version of an app if something goes wrong (if the snap packager is clever she even adds self tests in teh upgrade hooks), so snapd makes sure you always have one available version to go back to. This is by design and wanted behaviour.

(indeed that doesnt explain why your diskspace was not freed when you forcefully removed a version, i’ll leave that for others to find out :slight_smile: )

Already found the culprit cache directory :grinning:, but thanks anyway.