diskard-0.1.2 is not a library.
diskard
Developer-aware disk cleanup CLI. Scans your machine for reclaimable space from build caches, AI models, package managers, and IDE artifacts.
Why
Developers accumulate tens of GBs of reclaimable space — Xcode DerivedData, npm cache, Ollama models, HuggingFace cache, Docker images, Cargo target dirs, and more. diskard finds them all and lets you clean up safely.
Install
Usage
# Scan for reclaimable space
# Scan with JSON output
# Scan only safe-to-delete items
# Scan with minimum size filter
# Filter by category
# Sort by risk or category instead of size
# Only show items older than 30 days
# Combine filters
# Clean (move to Trash by default)
# Clean with dry-run
# Permanently delete (no Trash)
# Clean a specific category
# List available recognizers
# Manage config
Recognizers
18 built-in recognizers across 13 categories:
| Recognizer | Category | Path | Risk |
|---|---|---|---|
| Xcode DerivedData | Xcode | ~/Library/Developer/Xcode/DerivedData |
Safe |
| Xcode DeviceSupport | Xcode | ~/Library/Developer/Xcode/iOS DeviceSupport |
Moderate |
| Xcode Simulators | Xcode | ~/Library/Developer/CoreSimulator/Devices |
Risky |
| Xcode Archives | Xcode | ~/Library/Developer/Xcode/Archives |
Moderate |
| Xcode Previews | Xcode | ~/Library/Developer/Xcode/UserData/Previews |
Safe |
| npm cache | Node.js | ~/.npm |
Safe |
| node_modules | Node.js | **/node_modules/ (with package.json) |
Safe |
| Homebrew cache | Homebrew | ~/Library/Caches/Homebrew |
Safe |
| pip cache | Python | ~/Library/Caches/pip |
Safe |
| Cargo target dirs | Rust | **/target/ (with Cargo.toml) |
Moderate |
| Docker data | Docker | ~/Library/Containers/com.docker.docker/Data |
Risky |
| Ollama models | Ollama | ~/.ollama/models |
Moderate |
| HuggingFace cache | HuggingFace | ~/.cache/huggingface |
Moderate |
| Claude Code data | Claude | ~/.claude/projects/, ~/.claude/debug/ |
Moderate |
| VS Code extensions | VS Code | ~/.vscode/extensions (old versions) |
Moderate |
| Gradle cache | Gradle | ~/.gradle/caches, ~/.gradle/wrapper/dists |
Safe |
| Maven repository | Gradle | ~/.m2/repository |
Moderate |
| CocoaPods cache | CocoaPods | ~/Library/Caches/CocoaPods |
Safe |
| .DS_Store files | Generic | **/.DS_Store |
Safe |
Configuration
Config file location: ~/.config/diskard/config.toml
[]
= "moderate"
= "trash"
= 0
[]
= []
[]
= []
Risk Levels
- Safe — Caches and build artifacts that regenerate automatically
- Moderate — Can be regenerated but may require downloads or time
- Risky — May contain user data or require manual reconfiguration
License
Dual-licensed under MIT or Apache 2.0.