# Is it safe to delete the NuGet packages folder on Mac?

- URL: https://moreroom.app/folders/dotnet-nuget
- Item: NuGet package cache
- Location: `~/.nuget/packages`
- Verdict: Safe to remove — Rebuilt or re-downloaded automatically when needed.
- Comes back on its own: yes
- Official command: `dotnet nuget locals all --clear`
- Source: MoreRoom rules catalogue (2026-10-17), by Yando Pte. Ltd.

## What is it?

`~/.nuget/packages` is NuGet’s global packages folder: every package version restored by `dotnet restore`, `dotnet build` or your IDE, shared by all .NET projects. Old versions are never removed automatically, so it often reaches several gigabytes.

## What happens if you delete it?

Packages are downloaded again on the next restore, which takes time and bandwidth. Projects build normally afterwards.

## How to remove it properly

Run `dotnet nuget locals all --clear` in Terminal, the official command, which also clears NuGet’s HTTP and temporary caches and deletes permanently. To empty only this folder, use `dotnet nuget locals global-packages --clear`.

## Before you delete it

Close Visual Studio Code, Rider or any running build first, since files in use cannot be removed.
