TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/lucasgelfond/zerobrew/llms.txt
Use this file to discover all available pages before exploring further.
zb gc command performs garbage collection by removing store entries that are no longer referenced by any installed packages.
Usage
Description
Zerobrew uses a content-addressed store to manage package files. When packages are uninstalled or upgraded, old versions may remain in the store. The garbage collector identifies and removes these unreferenced entries to free up disk space. This command is safe to run at any time - it will only remove store entries that are no longer needed by any installed package.How It Works
- Scans all currently installed packages
- Identifies which store entries are referenced
- Removes any store entries that aren’t referenced by installed packages
- Reports which entries were removed
Examples
Run garbage collection:Output
When unreferenced entries are found and removed:When to Use
Run garbage collection to free up disk space after:- Uninstalling packages
- Upgrading packages (old versions remain until gc)
- Failed installations that left partial store entries
- Resetting or cleaning up your zerobrew installation
Performance
The garbage collection process is typically fast, even with many installed packages. The command:- Only removes entries that are definitively unreferenced
- Uses efficient graph traversal to identify orphaned entries
- Operates directly on the filesystem without requiring network access
Related Commands
- zb uninstall - Uninstall packages (often followed by gc)
- zb reset - Reset entire zerobrew installation
- zb list - List installed packages