GhostHunter 1.0.1

dotnet tool install --global GhostHunter --version 1.0.1
                    
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 GhostHunter --version 1.0.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=GhostHunter&version=1.0.1
                    
nuke :add-package GhostHunter --version 1.0.1
                    

👻 NuGet Ghost Hunter

Stop wasting resources on dead weight. Ghost Hunter is a powerful .NET Global Tool designed to find and exterminate unused NuGet packages from your .csproj files.

Using Roslyn static analysis, it scans your source code for types, namespaces, and identifiers to determine if a package is actually "haunting" your project without being used.

🔥 Features

  • Deep Scanning: Goes beyond simple text search using Roslyn syntax trees.
  • Interactive Cleanup: Choose exactly which ghosts to bust using a stylish terminal UI.
  • Lightning Fast: Optimized indexing for large solutions.
  • Safe by Design: Ignores system SDKs and common testing frameworks by default.

🚀 Installation

Install it as a global tool via NuGet:

dotnet tool install --global GhostHunter

🛠 Usage

Navigate to your project folder and run:

ghost-hunter

Or specify a path to a specific project:

ghost-hunter ./src/MyProject.csproj

What happens next?

  1. The Hunt: The tool indexes all .cs files and cross-references them with your <PackageReference> list.
  2. The Verdict: A list of potential "ghosts" (unused packages) is presented in a table.
  3. The Exorcism: You select which packages to remove, and Ghost Hunter runs dotnet remove package for you.

🤝 Contributing

Found a bug or have a feature idea? Open an issue or submit a PR. Let's make .NET development cleaner together.

📄 License

MIT License. Feel free to use, modify, and distribute.

Product Compatible and additional computed target framework versions.
.NET 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.1 126 4/4/2026
1.0.0 114 4/4/2026