Skip to main content

Linux How to free up space

Published 1 min readMarkdown

$ sudo journalctl --vacuum-size=100M

Remove old snap versions that might be taking space

#!/bin/bash
# Removes old revisions of snaps
# CLOSE ALL SNAPS BEFORE RUNNING THIS
set -eu
snap list --all | awk '/disabled/{print $1, $3}' |
    while read snapname revision; do
        snap remove "$snapname" --revision="$revision"
    done

Resources:

  • https://ubuntuhandbook.org/index.php/2020/12/clear-systemd-journal-logs-ubuntu/
  • https://itsfoss.com/free-up-space-ubuntu-linux/

No comments yet. Be the first to comment.

More from this blog