Skip to content

Instantly share code, notes, and snippets.

@anirudh-ramesh
Last active March 14, 2023 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anirudh-ramesh/406b2ae9d66cb7e704d6efe1011e6d32 to your computer and use it in GitHub Desktop.
Save anirudh-ramesh/406b2ae9d66cb7e704d6efe1011e6d32 to your computer and use it in GitHub Desktop.
Clean Snap packages
# journalctl --disk-usage
journalctl --vacuum-size=50M
journalctl --vacuum-time=10d
echo SystemMaxUse=500M | tee -a /etc/systemd/journald.conf
#!/bin/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment