A .NET global tool that recursively removes bin and obj folders from .NET projects and solutions, freeing up disk space and ensuring clean builds.
.NET build artifacts accumulate quickly across large solutions. The built-in dotnet clean command only cleans projects it knows about — it won't touch orphaned or nested build folders. dotnet-superclean deletes every bin and obj directory it finds inside a .NET project directory.
dotnet tool install --global DotnetSuperCleanClean the current directory:
dotnet supercleanClean a specific path:
dotnet superclean /path/to/solutionPreview what would be deleted without deleting anything:
dotnet superclean --dry-runShow each folder as it is deleted:
dotnet superclean --verboseCombine options:
dotnet superclean /path/to/solution --dry-run --verbose| Option | Short | Description |
|---|---|---|
--dry-run |
-d |
List folders that would be deleted without deleting them |
--verbose |
-v |
Print each folder path as it is deleted |
- Enumerates all subdirectories under the target path
- Filters for directories named
binorobj - Skips directories already nested inside another
binorobj(their parent deletion covers them) - Skips directories whose parent does not contain a project file (
*.csproj,*.vbproj,*.fsproj, etc.) - Deletes from deepest path to shallowest to avoid operating on already-deleted directories
- Reports a summary of deleted folders and any failures
Super clean complete. 15 folder(s) removed.
Errors are printed in red, warnings in yellow, and success in green.