Skip to content

aos disk

Volumes: free and total space, eject removable drives

4 commands. Run aos disk --help for the same list from the binary, or see every group.

Mounted volumes and their space. list shows each volume with total, used and free space and whether it is removable; usage answers for the volume holding one path (your home folder by default). Free is what you can still write, the same number Finder, Explorer and df show as available. eject unmounts and ejects a removable drive (diskutil on macOS, udisksctl on Linux, the same calls Explorer uses on Windows) and refuses the system volume.

top answers “what is filling my disk”: it ranks the biggest folders (and files with --files) under a path, your home folder by default. The walk runs in parallel, never follows symlinks, stays on one volume and stops at --timeout (5 s by default); a walk cut short says partial: true and its sizes are lower bounds. Sizes are allocated bytes on macOS and Linux (what the files really take on disk) and apparent bytes on Windows. Well-known places carry a tag, a note and a safe verdict (yes, review, tool or no): trash, downloads, cache (~/Library/Caches, ~/.cache, %TEMP%), temp, xcode-derived-data, docker, ios-backup, spotlight-index and node_modules. It only reads; delete with aos file delete.

Unmount and eject a removable volume, by mount point or device

Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works

Terminal window
aos disk eject <mount|device>
flag values meaning
<mount|device> Required positional argument
Terminal window
aos disk eject /Volumes/USB
aos disk eject /dev/sdb1
aos disk eject E:

List mounted volumes with total, used and free space

Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works

Terminal window
aos disk list [--json]
flag values meaning
--json Optional
Terminal window
aos disk list
aos disk list --json

Rank the biggest folders (and files) under a path, tagging caches, trash and other known space hogs

Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works

Terminal window
aos disk top [<path>] [--depth=<n>] [--limit=<n>] [--timeout=<dur>] [--files] [--json]
flag values meaning
<path> Optional positional argument
--depth <n> Optional
--limit <n> Optional
--timeout <dur> Optional
--files Optional
--json Optional
Terminal window
aos disk top # biggest folders in your home, 5 s budget
aos disk top ~/Library --depth=2 --limit=30
aos disk top ~/Downloads --files --json
aos disk top / --timeout=30s --json

Print total, used and free space of the volume holding a path

Under WSL / SSH: runs on the Windows host (the machine with the screen). How the host works

Terminal window
aos disk usage [<path>] [--json]
flag values meaning
<path> Optional positional argument
--json Optional
Terminal window
aos disk usage # the volume holding your home folder
aos disk usage /Volumes/USB --json
aos disk usage D:\