Nixtat is a script for quick and simple nix store space occupation analysis.
It scans your /nix/store (or any specified path), aggregates package sizes by name (with or without versions), and displays a sorted, human-readable table of the results.
- Smart Aggregation: Automatically groups packages by name (e.g.,
python3-3.10andpython3-3.11are grouped underpython3unless configured otherwise). - Rich Output: Uses the
richlibrary for beautiful terminal tables, progress bars, and color coding. - Flexible Sorting: Sort by total size, occurrence count, or package name.
- Filtering: Automatically ignores
.drvmanifests and non-directory files. - Custom Paths: Can analyze alternative store locations.
- Script Friendly: Includes a
--simplifymode for machine-readable output.
Directly from the repository:
nix run github:jrodez/nixtator in a nix flake:
inputs.nixtat.url = "github:jrodez/nixtat";nix-build && ./result/bin/nixtat.py| Option | Description |
|---|---|
-H, --human-readable |
Default. Display sizes in human-readable format with headers and progress bar. |
--simplify |
Disable rich output. Use simple text format (name size count % %cumul). |
--with-version |
Keep version numbers in package names (e.g., go-1.20 instead of go). |
--sort {size,count,name} |
Column to sort by. Default is size. |
-r, --reverse |
Reverse the sort order. |
-n N |
Limit output to N lines. |
--full |
Display all lines (disables auto-truncation based on terminal height). |
--path PATH |
Path to the nix store (default: /nix/store). |
-v, --verbose |
Display errors (like permission denied) as they occur. |
View top disk consumers:
nixtat.pyView top consumers keeping versions distinct:
nixtat.py --with-versionSort by number of store paths (occurrences):
nixtat.py --sort count