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
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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package GhostHunter --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
👻 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?
- The Hunt: The tool indexes all .cs files and cross-references them with your <PackageReference> list.
- The Verdict: A list of potential "ghosts" (unused packages) is presented in a table.
- 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 | Versions 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.