From 26e1ae8160c0f3e69541d19f64478e9bff9ef21d Mon Sep 17 00:00:00 2001 From: Edward Delaporte Date: Fri, 23 Jan 2026 19:54:11 -0600 Subject: [PATCH] Add commands to free disk space on Linux Mint --- files/tab/tasks.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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" -- 2.47.3