DotnetSuperClean 1.0.6

dotnet tool install --global DotnetSuperClean --version 1.0.6
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local DotnetSuperClean --version 1.0.6
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=DotnetSuperClean&version=1.0.6
                    
nuke :add-package DotnetSuperClean --version 1.0.6
                    

dotnet-superclean

A .NET global tool that recursively removes bin and obj folders from .NET projects and solutions, freeing up disk space and ensuring clean builds.

Why?

.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.

Installation

dotnet tool install --global DotnetSuperClean

Usage

Clean the current directory:

dotnet superclean

Clean a specific path:

dotnet superclean /path/to/solution

Preview what would be deleted without deleting anything:

dotnet superclean --dry-run

Show each folder as it is deleted:

dotnet superclean --verbose

Combine options:

dotnet superclean /path/to/solution --dry-run --verbose

Options

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

How it works

  1. Enumerates all subdirectories under the target path
  2. Filters for directories named bin or obj
  3. Skips directories already nested inside another bin or obj (their parent deletion covers them)
  4. Skips directories whose parent does not contain a project file (*.csproj, *.vbproj, *.fsproj, etc.)
  5. Deletes from deepest path to shallowest to avoid operating on already-deleted directories
  6. Reports a summary of deleted folders and any failures

Example output

Super clean complete. 15 folder(s) removed.

Errors are printed in red, warnings in yellow, and success in green.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.0.6 109 4/15/2026