Skip to content

Repository files navigation

NetCleaner

A simple CLI tool for cleaning up your .NET project folders. Quickly delete bin and obj folders with safety as files only get deleted when .csproj or .sln file presents in the folder.

Installation

The tool requires .NET 6.0 or up. You can download it here.

Install the CLI globally from Nuget:

dotnettoolinstall-gNetCleaner

To make sure the tool is up-to-date, run this command:

dotnettoolupdate-gNetCleaner--no-cache

After that you can try running netclean --help or netclean --version to ensure the tool was installed.

Installation

Usage

Run netclean -h to list all supported parameters.

By default, the tool runs in WhatIf mode and no file are actually deleted. When you are sure the files/folders are good to be deleted, run with -d or --Delete.

For example, netclean -r "TestCleaner" -s would search all obj and bin folders/files inside TestCleaner folder (relative to current directory) as well as report the size of these folders/files.

Running netclean -r "TestCleaner" -s -d would actually delete the folders/files.

Usage

-d,--DeleteActuallydeletethefolders.Default:false.-n,--NamesFolderandFilenamesincomma-separatedlistthatshouldbedeleted.NOTcase-sensitive.Default:bin,obj-e,--ExtensionsFileextensionsthatisrequiredtoexistinordertodeletefolders.NOTcase-sensitive.Ifnoneisspecified,filesandfolderswillbedeleted.Default:sln,csproj,wapproj-s,--SizeReporttotalfilesizeofdeletedfolders-r,--RootStartfolderwherethesearchisperformed.DefaulttoCurrentDirectory.-i,--IgnoresIgnorethesefoldernamesinthiscomma-separatedlist.NOTcase-sensitive.Default:(nothing)--helpDisplaythishelpscreen.--versionDisplayversioninformation.

About

Quickly clean .NET project build folders (bin, obj). Can also be customized for other kind of folders.

Topics

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages