ahab
December 22, 2025 · View on GitHub
A Docker cleanup TUI - hunt down and harpoon unused Docker resources

What It Does
Ahab connects to your Docker daemon and helps you identify and remove:
- Dangling and unused images
- Stopped containers
- Orphaned volumes
- Unused networks
Resources are classified as safe or risky so you don't accidentally delete something important.
Note: Volumes are always marked risky because the Docker API doesn't expose mount information needed to determine if they're in use. Use --unsafe to select volumes for deletion.
Requirements
- Docker: API version 1.44+ (Docker 25.0+)
Install
Quick Install (Recommended)
curl -fsSL https://raw.githubusercontent.com/lance0/ahab/master/install.sh | sh
Homebrew (macOS/Linux)
brew install lance0/tap/ahab
Download Binary
Pre-built binaries are available on the releases page:
ahab-linux-x86_64.tar.gz- Linux x86_64ahab-linux-aarch64.tar.gz- Linux ARM64ahab-macos-x86_64.tar.gz- macOS Intelahab-macos-aarch64.tar.gz- macOS Apple Silicon
Build from Source
Requires Zig 0.15.1+
git clone https://github.com/lance0/ahab.git
cd ahab
zig build -Doptimize=ReleaseSafe
Binary is at ./zig-out/bin/ahab
Build options:
ReleaseSmall- smallest binary (~130KB)ReleaseSafe- with safety checks (~3MB)- Omit flag - debug build (~12MB)
Run tests:
zig build test
Usage
ahab # normal interactive mode
ahab --dry-run # preview deletions without deleting
ahab --unsafe # allow selecting risky resources
ahab --host /path.sock # custom docker socket
Controls
| Key | Action |
|---|---|
tab / < / > | Next / previous tab |
↑/↓ or j/k | Navigate list |
Shift+↑/↓ or J/K | Select range |
g / G | Go to top / bottom |
space | Toggle selection |
a | Select all safe items (current tab) |
P | Prune all safe (all tabs + confirm) |
c | Clear selections |
/ | Filter/search (case-insensitive) |
s / S | Cycle sort field / reverse order |
enter | Show details for selected item |
r | Refresh data from Docker |
d | Delete selected |
? | Show help |
q | Quit |
Tabs
- Images - Docker images with size and age
- Containers - All containers with status
- Volumes - Docker volumes
- Networks - User-defined networks
- Summary - Overview and estimated space reclaim
License
MIT