brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: snap removal keeps a copy of the app data unless you purge it

Snap
~/tips/tip-snap-remove-purge

snap saved

Skip the automatic snapshot when you are sure the data can go.

A normal snap remove is more careful than people expect. Before it deletes the app’s data, it saves a snapshot of it, so the disk space does not come back right away.

Look at what is already being kept:

snap saved

If you are certain you want nothing from the app, remove it with the purge flag:

sudo snap remove vlc --purge

Warning: this deletes the data of that snap with no snapshot to restore from. There is no undo, so copy anything you want to keep first. The data lives under /var/snap/ for the system part and under ~/snap/ for each user.

I use the plain remove by default, because the automatic copy is a nice safety net when I change my mind a week later. Purge is for test installs, for apps I tried once, and for a machine where the disk is tight.

Snapshots made on removal are cleaned up by snapd after about a month, so waiting is also an option. If you need the space today, snap forget with the set ID from the list removes a stored one. The docs note that Ubuntu Core systems behave differently and do not keep these copies.

Further reading: Snapcraft: Data locations

More Snap tips snap refresh --list sudo snap save lxd snap services sudo snap stop --disable lxd.daemon sudo snap alias vlc my-vlc All Snap tips (14) All topics

Link