

The script would also show the name of the package being removed. When I ran the script, it reduced a lot of disk space. sh in a directory (for example clean_snap.sh), give it executable permission and run.

Snap remove "$snapname" -revision="$revision" LANG=en_US.UTF-8 snap list -all | awk '/disabled/' | Here’s the script we will use to clean the Snap up. The contents of each snapshot reflect the state of the file system at the time the snapshot was created. In a post in SuperUser, Popey, the ex-Engineering Manager at Canonical, provided a simple script that can clean up old versions of Snaps and keep the latest one. The Snap Store application is in the store labeled snap-store. A snapshot is a read-only copy of the entire file system and all the files contained in the file system. sudo snap set system refresh.retain=2 Clean Up Snap Versions However, you can easily modify the count using the following command. This is okay if you do not have constraints on your disk space.īut for servers and other use cases, this can easily run into cost issues, consuming your disk space. If that doesn't suit you, our users have ranked more than 100 alternatives to Snapchat and ten of them are available for Linux so hopefully you can find a suitable replacement. The best Linux alternative is Telegram, which is free. That means Snap keeps three older versions of each package, including the active version. Snapchat is not available for Linux but there are some alternatives that runs on Linux with similar functionality. The default value is 3 for several revisions for retention.
