Skip to main content

Command Palette

Search for a command to run...

Linux How to free up space

Updated
1 min read

$ 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/

More from this blog

Mensah David Assigbi's personal IT blog

28 posts