Skip to content

Is it safe to delete NuGet global packages folder?

Every NuGet package version your .NET projects have restored, used directly by those projects.

Usually safe

It can be recreated, but it takes a download, a reinstall or the tool's own command.

~/.nuget/packages

What it is

When a .NET project restores its dependencies, NuGet unpacks each package version into this folder once, and projects use the packages from here instead of keeping their own copies. NuGet doesn't remove versions by itself, so packages from old projects and older versions build up over time.

If it's removed

Each project needs its packages restored again before it builds, which downloads them again. Packages from sources you can no longer reach can't be restored. An open editor may need to reload the project.

How it's removed

NuGet's own cleanup command (dotnet nuget locals global-packages --clear), run by the app.

PRO

The free analyzer finds it and explains it. Removing it is Pro, after a review sheet that lists every move and command. It's never checked for you: it waits for your choice.

Sources

Last checked on 26 Sep 2026. Every entry is written and checked by hand; the app and the command-line tool use the same words.