Browse a list of NixOS system generations with build date, version, and disk usage.
Mark and delete multiple old generations at once to free up disk space.
Automatically run garbage collection right after deleting old generations.
Run nclean once without installing it, or add it permanently to your Nix profile.
| p0nczek/nclean | 920linjerry-stack/capital-studio | adya84/ha-world-cup-2026 | |
|---|---|---|---|
| Stars | 16 | 16 | 16 |
| Language | Python | Python | Python |
| Setup difficulty | easy | easy | easy |
| Complexity | 2/5 | 3/5 | 2/5 |
| Audience | developer | researcher | general |
Figures from each repo's GitHub metadata at analysis time.
Requires the nh tool on PATH and sudo access for nix-env and nix-collect-garbage.
nclean is a small terminal application for NixOS users that helps you browse and delete old system generations. NixOS keeps a history of every configuration you have ever built, called generations, and over time these can pile up and take a lot of disk space. Instead of running commands by hand, nclean gives you a simple text based interface, built with the curses library, where you can see all your generations at a glance along with their build date, NixOS version, kernel, and how much disk space each one takes up. Inside the interface, you move up and down the list with the arrow keys, mark individual generations you want to remove, or mark everything below your current position at once. Once you have made your selections, pressing a key deletes them after asking for confirmation, using the standard sudo nix-env delete generations command under the hood. There is also an option to automatically run a garbage collection step after deleting, which frees up the actual disk space rather than just removing the generation record. The list refreshes automatically every thirty seconds, and you can also force a refresh manually, all while the interface keeps working in the background since the refresh runs on a separate thread. Your current, active generation can never be accidentally marked or deleted. To install it, you need the nh tool available on your system, along with sudo access to run the relevant Nix commands. If you use Nix, you can either run nclean once without permanently installing it, or add it to your Nix profile so the nclean command is always available in your terminal. It can also be added as an input to a NixOS or home-manager configuration. The README notes this project was built with AI assistance and that the author is not a professional developer, though they say it has been reviewed and tested. It asks anyone who finds bugs, especially anything involving sudo, to open an issue or pull request, and it is released under the MIT license.
A terminal tool for NixOS that lists old system generations and lets you mark and delete the ones you no longer need.
Mainly Python. The stack also includes Python, Nix, curses.
MIT, use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.