From: Edward Delaporte Date: Sat, 24 Jan 2026 01:54:11 +0000 (-0600) Subject: Add commands to free disk space on Linux Mint X-Git-Url: https://apps.delaporte.us/gitweb/dotfiles.git/commitdiff_plain/26e1ae8160c0f3e69541d19f64478e9bff9ef21d?ds=sidebyside Add commands to free disk space on Linux Mint --- diff --git a/files/tab/tasks.py b/files/tab/tasks.py index f1e6339..9a187d2 100644 --- a/files/tab/tasks.py +++ b/files/tab/tasks.py @@ -60,9 +60,24 @@ def screenshare(c): browse(c, 'https://app.screego.net/#/') c.run('dino') +@task +def show_free_space(c): + c.run('df -h | grep G') # We only care about disks measured in G + @task() -def free_disk_space(c): +def free_disk_space(c, ruthless=False): + show_free_space(c) c.run('podman container cleanup --all --rm') + # Dolphin Trash ...should regenerate + c.run(f'sudo rm -rf {HOME}/.local/share/Trash') + # c.run(f'rm {HOME}/Downloads/*.iso') + c.run('sudo apt-get autoclean') # Remove useless apt cache + if ruthless: + c.run(f'rm -rf {HOME}/Downloads/*') + c.run('sudo apt-get clean') # Remove all apt cache + show_free_space(c) + + SCHOOL = f"{HOME}/School"