Skip to content
SquirrelDisk

Windows

Is it safe to delete the Package Cache folder?

No. Installers need C:\ProgramData\Package Cache to repair, update and uninstall. Remove unused products instead. npm, NuGet and pip caches are fine.

Updated 6 October 2026

No, it's not safe to delete C:\ProgramData\Package Cache. It holds the installers that Visual Studio, Visual C++ redistributables, .NET, SQL Server and many other products need to repair, update and uninstall themselves. Delete it and things keep working, until the day one of those installers runs and can't find its files. If the folder is big, uninstall products you don't use instead.

Quick verdict:

  • C:\ProgramData\Package Cache: don't delete it, and especially don't delete folders that contain an .exe.
  • Leftover folders of products you've already uninstalled: low risk, but hard to identify.
  • Visual Studio's own cache (C:\ProgramData\Microsoft\VisualStudio\Packages): shrink it with the Visual Studio Installer, not by hand.
  • Developer package caches (npm, NuGet, pip): safe to clear with their own commands.

What is the Package Cache folder?

C:\ProgramData\Package Cache is created by Burn, the bundle installer from the open source WiX Toolset. Microsoft uses it for many products, and so do other companies. When you install something with Burn, it keeps a copy of the installer and its packages (.exe, .msi, .cab files) in this folder. Per-user installs use %LocalAppData%\Package Cache instead. ProgramData is hidden, so type the path into the File Explorer address bar to open it.

Microsoft's Heath Stewart explains why in Package caching in Burn: when Windows Installer repairs or updates a product, it often needs the original package. Without a cached copy, it has to ask for the setup media or download it again, and silent installs and updates can simply fail.

You'll typically find folders for:

  • Visual C++ Redistributables, often several years and versions.
  • .NET runtimes and SDKs.
  • Visual Studio components and tools.
  • SQL Server and its tools.
  • Other products built with WiX, from drivers to games and audio software.

Folder names are long codes, often a GUID in braces. That's why it's hard to tell which product a folder belongs to.

The folder grows because every installed version keeps its own copy, and uninstalling isn't always perfect: leftovers can remain after a failed or interrupted uninstall.

How much space does it use?

Right-click C:\ProgramData\Package Cache and choose Properties.

To see which folders inside are big, scan it. With SquirrelDisk:

  1. On the home screen, click A folder and paste C:\ProgramData\Package Cache into the folder dialog, or run squirreldisk "C:\ProgramData\Package Cache" in a terminal.
  2. The biggest folders are listed first. Click one to see the .exe and .msi files inside; the file names usually tell you which product it belongs to.
  3. While you're there, scan C:\ProgramData\Microsoft\VisualStudio\Packages too if you use Visual Studio.

SquirrelDisk runs without administrator rights, so any part your account can't read is skipped and the total may look smaller than in Explorer. It asks for an extra confirmation before deleting anything in ProgramData, and it never deletes anything inside C:\ProgramData\Microsoft. For this folder, the answer to "delete?" should almost always be no. Use it to understand where the space goes, then use the methods below.

How to free the space safely

1. Uninstall products you don't use

Open Settings → Apps → Installed apps and remove old versions of Visual Studio, SQL Server, .NET SDKs and other development tools you no longer need. Their uninstallers remove their own cached packages. This is the only clean way to shrink Package Cache.

Don't uninstall Microsoft Visual C++ Redistributables just because there are many of them. Different apps need different versions, and removing one can stop an app or game from starting.

2. Shrink Visual Studio's download cache

Visual Studio's installer has its own cache, which can be large. Microsoft documents how to disable or move the package cache:

  1. Open a command prompt as administrator.

  2. Run:

    "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" --nocache
    
  3. Modify or repair Visual Studio from the installer that opens. Microsoft says this removes the cached packages for that product and stops saving new ones. Anything needed later is downloaded and removed after use.

When you install Visual Studio for the first time, the Installation locations tab also has a Keep download cache after the installation checkbox and lets you put the cache on another drive. See Select installation locations.

The trade-off: repairs and modifications will need an internet connection.

3. Remove only true leftovers, carefully

If you're sure a product is no longer installed and its folder is still in Package Cache, you can remove that folder. Look at the file names inside to identify the product, check it isn't in Installed apps, and move it to the Recycle Bin rather than deleting it for good. If anything complains, restore it.

What you should not delete

  • The whole Package Cache folder. Microsoft's setup team recommends not removing it: it's shared by every product installed with Burn.
  • Folders that contain an .exe. Those are usually the bundles themselves. In a later post the same team warns they're needed to repair, service or even uninstall the product.
  • Anything for products still installed. Updates, including some delivered by Windows Update or Microsoft Update for Visual Studio, .NET and SQL Server, may need these files.

If you've already deleted it: the products keep working. When a repair, update or uninstall fails, run that product's latest installer from the vendor's site (for example, the current Visual C++ Redistributable or .NET installer from Microsoft) and choose Repair. That puts its cache back. For Visual Studio, run a repair from the Visual Studio Installer while online.

Other kinds of "package cache"

If you're a developer, "package cache" may mean something else: the cache of a package manager. These are a different story and are safe to clear, because they only hold copies of packages that can be downloaded again.

ToolWhere on WindowsHow to clear
npm%LocalAppData%\npm-cachenpm cache clean --force
NuGet%UserProfile%\.nuget\packages and %LocalAppData%\NuGet\v3-cachedotnet nuget locals all --clear
pip%LocalAppData%\pip\Cachepip cache purge

Microsoft's NuGet cache guide notes that after clearing the global packages folder you'll need to restore your projects again, which downloads everything they use. Close Visual Studio or your editor first, so no files are in use. Expect the next build or install to be slower.

For the rest of your drive, see Is it safe to delete the AppData folder? and Is it safe to delete temp files?.

Questions

What happens if I delete C:\ProgramData\Package Cache?

Nothing at first. Later, when you try to repair, update or uninstall Visual Studio, a Visual C++ redistributable, a .NET runtime or SQL Server, the installer may fail or ask for the original setup file. Some products can re-download what's missing; others can't.

Can I delete Package Cache folders for programs I've uninstalled?

Normally the uninstaller removes them. If a product is truly gone from Settings → Apps → Installed apps and its folder is left behind, deleting it is low risk. The difficulty is knowing which product a folder belongs to, so most people are better off leaving it.

Can I move the Package Cache to another drive?

Not in a supported way for the Windows Package Cache folder. Visual Studio's own download cache can be moved with the CachePath policy or chosen when you first install it.

Is Package Cache the same as the Visual Studio download cache?

No. Visual Studio keeps its own cache in C:\ProgramData\Microsoft\VisualStudio\Packages, which you can shrink with the installer's --nocache option. C:\ProgramData\Package Cache is shared by every product installed with the WiX Burn installer, including parts of Visual Studio.

Is it safe to clear the npm, NuGet or pip cache?

Yes. Those caches only hold copies of downloaded packages. Use npm cache clean --force, dotnet nuget locals all --clear or pip cache purge; the next install or restore downloads what it needs again.

Try SquirrelDisk

Free and open source, for macOS, Windows and Linux.

v2.5.0 · macOS · Windows · Linux