docklean
v0.1.4
Published
Safely find and clean unused Docker resources
Downloads
404
Maintainers
Readme
docklean
Safely find and clean unused Docker resources from the command line.
Requirements
- Node.js 18+
- Docker installed and the daemon running
Install
Run directly with npx:
npx dockleanOr install globally:
npm install -g dockleanUsage
Scan only (no deletes):
dockleanInteractive cleanup (prompts before delete):
docklean --allSelective cleanup:
docklean --containersDry run (shows commands that would run):
docklean --all --dry-runSkip prompt:
docklean --all --forceFilter by age:
docklean --images --older-than 7dFlags
--containersClean stopped/exited containers--imagesClean unused/dangling images--volumesClean unused volumes--networksClean unused networks--cacheClean build cache--danglingDangling images + stopped containers + unused volumes--allAll unused resources--older-than <duration>Only clean items older thanm/h/d/w--dry-runPrint what would be removed--forceSkip confirmation prompt--yesAlias for--force--jsonJSON output--quietMinimal output--verboseMore verbose output--no-colorDisable colored output
Exit Codes
0Success1Docker CLI not found2Docker daemon not running3Nothing to clean or user declined4Partial failure5Invalid arguments
Development
npm install
npm run build
npm run dev -- --all --dry-run