Shravan OmanakuttanAI / ML engineer

A hand reaches out

000
Shravan OmanakuttanAI / ML engineer
← All builds

Low-disk guard for your computer

A script that checks space, finds the heavy folders and runs on a schedule. A learning version inspired by mac-ssd-toolkit.

Step 1 of 4

Read free space

Start with one number you can trust.

import shutil
total, used, free = shutil.disk_usage("/")
print(f"free {free / 1e9:.1f} GB of {total / 1e9:.1f} GB")

You are done whenIt prints a sensible number.

↑ ↓ move↵ selectesc close