PDF download Download Article
Get rid of corrupt cache files to fix update installation errors
PDF download Download Article

Are you having trouble installing Windows Updates? If a Windows update fails mid-way or gets stuck installing, clearing the update cache forces Windows to redownload the installation files from Microsoft, which tends to fix the problem. Read on for simple steps to clear the Windows Update cache using Windows 10 or 11.

Quick Steps

  1. Open Command Prompt as an administrator.
  2. Type "net stop wuauserv" and press Enter .
  3. Type "net stop bits" and press Enter .
  4. Type "rmdir /S /Q C:\Windows\SoftwareDistribution" and press Enter .
  5. Type "net start wuauserv" and press Enter .
  6. Type "net start bits" and press Enter .
Section 1 of 6:

When should you clear the Windows Update cache?

PDF download Download Article
  1. When Windows installs updates, it first downloads the installation files and saves them to a folder. Once the files are downloaded, Windows uses them to install the updates. If Windows Update fails , gives you an error, or gets stuck , there could be a problem with files in that cache. To fix the failed update, you can easily clear the update cache—it's safe and will not harm your computer.
    • You can also clear the update cache to free up space on your computer. However, Windows does clear the update cache automatically—the files are only saved for a certain period after an update is installed successfully, just in case you need to revert to a previous update.
  2. Advertisement
Section 2 of 6:

Using Command Prompt

PDF download Download Article
  1. An easy way to clear the Windows Update cache is from the command prompt. Don't worry—this is simple, even if you're uncomfortable typing commands. To open Command Prompt as an admin :
    • Press the Windows key and type cmd .
    • Right-click Command prompt and select Run as administrator .
    • Click Yes to confirm.
  2. If the services are running, you won't be able to delete the entire update cache. At the prompt, type the following commands:
    • Type net stop wuauserv and press Enter .
    • Type net stop bits and press Enter .
  3. This command deletes everything in the C:\Windows\SoftwareDistribution folder, which is where cached update files are stored:
    • Type rmdir /S /Q C:\Windows\SoftwareDistribution and press Enter .
  4. Now that the update cache is clear, you can restart the services you stopped earlier.
    • Type net start wuauserv and press Enter .
    • Type net start bits and press Enter .
  5. Advertisement
Section 3 of 6:

Using File Explorer

PDF download Download Article
  1. Another way to clear the Windows Update cache is using File Explorer. Before you do this, though, you'll want to stop the Windows Update services so the files can actually be removed. To open Windows Services:
    • Press the Windows key or click the Windows menu.
    • Type services.msc and press Enter .
  2. To do this, scroll down to "Windows Update," right-click it, and select Stop .
    • Leave the window open for now. After clearing the update cache, you'll need to reenable these services.
  3. Scroll back up, right-click "Background Tasks Infrastructure Service," and select Stop . This will ensure that nothing prompts Windows Update to restart until you do it manually.
  4. The Windows folder is located at C:\Windows on most PCs.
    • For example, if Windows is installed on your C drive, click This PC in the left panel, click the C drive, then double-click the Windows folder.
  5. To fully clear the update cache, you'll want to delete everything in this folder. Scroll down, select SoftwareDistribution , press the delete key on your keyboard, and click Continue to confirm.
  6. Now that the cache is empty, return to the Windows Services window and restart the services you stopped.
    • Right-click Background Tasks Infrastructure Service and select Start .
    • Right-click Windows Update and select Start .
  7. Advertisement
Section 4 of 6:

Using a Batch Script

PDF download Download Article
  1. If you want to clear the update cache quickly in the future, you can use this method to write a quick batch script that clears the update cache for you. You will need to run this script as an administrator for it to work.
  2. This script stops the Windows Update service, stops the Background Intelligent Transfer Service, clears the cache, and then restarts the services.
     @ 
     Echo 
    On
    net stop wuauserv
    net stop bits
    C : 
     rmdir 
    /S /Q %Windir% 
    \SoftwareDistribution
    net start wuauserv
    net start bits pause 
    
  3. If you're using Notepad, click the File menu, select Save as , and choose a folder to save the file in. Then, select "All files" from the "Save as type" menu, name the file something like "clear_update_cache.bat", and click Save .
  4. To use your script to clear the cache, right-click the file, select Run as administrator , and then click Yes to confirm. A Command Prompt window will open and run the commands from the script.
    • When the script is finished running, the Windows Update cache will be cleared, and you'll see "Press any key to continue . . ." at the bottom. When you press a key, the window will close.
  5. Advertisement
Section 5 of 6:

Using Windows Settings

PDF download Download Article
  1. Press the Windows key on your keyboard (or click the Windows menu) and select Settings .
    • This method can be helpful to free up some disk space , but it usually won't fix any Windows Update errors. The files you'll be deleting are update files from previous updates, and they're meant to help you in case you need to revert to the last version.
  2. If you're using Windows 11, it'll be in the left panel. On Windows 10, click the System icon.
  3. It's in the center panel on Windows 11, and at the bottom of the left panel on Windows 10. Windows will quickly scan to determine the amount of space used on your PC.
  4. This displays a list of different types of temporary files stored by Windows, including how much space each file type is consuming. [1]
  5. If you don't see this option, there aren't any Windows Update files to delete. They're deleted automatically after a while.
    • You can, however, check "Delivery Optimization Files," which does contain some cached files relating to Windows Update. However, these cached files are intended to improve update speeds for other computers on your network. [2]
    • If you're low on space, we recommend selecting other types of temporary files to delete as well. Just be careful not to select "Downloads" if you don't want to delete everything in your Downloads folder.
  6. This clears the Windows Update cache and frees space from other selected temporary files.
  7. Advertisement
Section 6 of 6:

Using Disk Cleanup

PDF download Download Article
  1. To do this, press the Windows key on your keyboard, type disk cleanup , and click Disk Cleanup from the search results. [3]
    • Like the Settings method, using Disk Cleanup to clear the Windows Update cache won't fix problems with Windows Update. The files you'll be deleting will free up space from existing update files that are no longer needed, but because these files are just backed-up files from your previous update, this is not the equivalent of clearing the cache, despite what some believe.
  2. This quickly scans files that can be deleted and displays them in a list.
  3. If you don't see this option, there aren't any Windows Update files to delete. They're usually deleted automatically after a while.
    • You can, however, check "Delivery Optimization Files," which does contain some cached files relating to Windows Update. However, these cached files are intended to improve update speeds for other computers on your network.
    • If you're running low on space, select any other types of files you want to delete. You can even select "Recycle Bin" to permanently delete your deleted files.
  4. This deletes the selected Windows Update files (and any other files you selected).
  5. Advertisement

Expert Q&A

Ask a Question
      Advertisement

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!

      About This Article

      Thanks to all authors for creating a page that has been read 459 times.

      Is this article up to date?

      Advertisement