diff --git a/README.md b/README.md index 20fa14d..8c1952a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ +--- +title: distro.tools +description: Scripts for lazy Linux users +--- + # distro.tools This is a collection of shell scripts for easy management of your Linux install. The goal is to provide scripts for every possible use case from updating your system to configuring some special things. Feel free to provide your scripts. @@ -39,3 +44,4 @@ Scripts applicable on most distributions: Scripts focused on Ubuntu and derivates: `ubuntu/update` (sudo) - Update your Ubuntu system including Snaps and Flatpaks +`ubuntu/removeoldsnaps` (sudo) - Remove old versions of installed Snaps diff --git a/ubuntu/removeoldsnaps b/ubuntu/removeoldsnaps new file mode 100755 index 0000000..a816c57 --- /dev/null +++ b/ubuntu/removeoldsnaps @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -eu +LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' | + while read snapname revision; do + snap remove "$snapname" --revision="$revision" + done \ No newline at end of file