How to delete downloaded Windows Update files - gHacks Tech News

How to delete downloaded Windows Update files

Windows Update works for the most part pretty reliable. It is an automated system of Microsoft's Windows operating system that handles the downloading and installing of updates for the operating system.

At best, it is a silent service that runs in the background; it may ask you to restart the PC every now and then though as that is still required for many updates, and it sometimes may do so without user interaction.

When you run into issues though with updates, you may spend hours or even days figuring out what is going wrong.

I cannot update one of my PCs to the Windows 10 Fall Creators Update for instance because of a bluescreen that I get whenever I try to do so.

One of the things that you can try when it comes to updates, is to delete downloaded Windows Update files to start over.

If you suspect that something is wrong with the files, or if you want Windows Update to run a new check for updates to download new versions of updates that were released by Microsoft, then you may find the following tip useful for that.

If you run Windows Insider builds on a PC for instance, you may skip an already downloaded update to a new build to download a newer build and avoid having to update the system multiple times.

How to delete downloaded Windows Update files

windows delete cached updates

It is thankfully pretty easy to delete all cached update files. This works on all supported versions of Windows, including Windows 7, Windows 8.1 and Windows 10.

  1. Open the Start Menu (tap on the Windows-key or click on it).
  2. Type services.msc.
  3. Right-click on the result, and select "run as administrator" from the context menu.
  4. Locate the Service Windows Update. The services listing is sorted alphabetically by default. Click on name to revert the order so that you don't need to scroll as much.
  5. Right-click on the service Windows Update and select Stop from the menu.
  6. Go to C:\WINDOWS\SoftwareDistribution\Download using Explorer or any third-party file browser. If you navigate to the folder manually, you may need to enable the showing of hidden files first.
    1. Do so with a click on File > Change folder and search options.
    2. Go to View, and scroll down until you find "Hidden files and folders" listed.
    3. Select "Show hidden files, folders and drives".
    4. Remove the checkmark from "Hide protected operating system files (Recommended)".
    5. Click Apply, then OK.
  7. Select all files of the folder. The easiest way to do that is to use Ctrl-A while the folder is active.
  8. Hit the Delete-key on the computer keyboard.
  9. Windows may need administrator privileges to delete certain files. Select "do this for all current items" and click continue to grant the permissions.
  10. Go back to the Services window.
  11. Right-click on the Windows Update service, and select Start from the list of options.

you'll need to provide administrator permission

You can re-run a check for updates once all files have been deleted. Please note that Windows Update will download all updates anew when you clear the update cache. This can lead to Gigabyte large downloads.

Clear the Windows Update cache from the command line

delete windows update cache

You may purge the Windows Update cache from the command line as well. While you can type the following commands on an elevated command prompt manually, you may create a small batch file as well toautomate the process.

Here is what you need to do:

  1. Tap on the Windows-key to bring up the Start Menu.
  2. Type cmd.exe.
  3. Hold down the Shift-key and the Ctrl-Key before you select the cmd.exe result. This opens an elevated command prompt.
  4. Accept the UAC prompt that Windows displays.
  5. Run the following commands and hit enter after each line:
    1. net stop wuauserv
    2. cd %Windir%\SoftwareDistribution
    3. del /f /s /q Download
    4. net start wuauserv

The commands explained:

  • net stop wuauserv -- This stops the Windows Update service.
  • cd %Windir%\SoftwareDistribution -- Switches to the SoftwareDistribution directory of the Windows installation.
  • del /f /s /q Download -- Deletes the Download folder of the SoftwareDistribution directory with
    • /f -- force the removal of read-only files.
    • /s -- include files in subdirectories.
    • /q -- in quiet mode to surpress prompts.
  • net start wuauserv -- Starts the Windows Update service.

We have uploaded a batch file to our own server which you may run to execute the commands automatically. You need to right-click on the file and select "run as administrator" as it requires administrative privileges.

You can download the file with a click on the following link: clear-windows-update-cache.zip

Note that it is supplied as an archive that you do need to extract before you may run it.

Tip: Check out these Windows Update related articles and guides

Summary
How to delete downloaded Windows Update files
Article Name
How to delete downloaded Windows Update files
Description
Find out how to delete downloaded (cached) Windows Update files on all supported versions of the Microsoft Windows operating system.
Author
Publisher
Ghacks Technology News
Logo




  • We need your help

    Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

    We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats (video ads) or subscription fees.

    If you like our content, and would like to help, please consider making a contribution:

    Comments

    1. Mark Hazard said on November 16, 2017 at 9:18 pm
      Reply

      I always thought that Disk Cleanup removed old Windows Update files, among other things.
      Am I wrong?

      1. ilev said on November 18, 2017 at 8:08 am
        Reply

        It does if marked, but doesn’t delete all files.

    2. Haikal Rahman said on November 17, 2017 at 1:53 am
      Reply

      Hi Martin, what happen if i deleted the downloaded file? does it impact the system, like cache ? windows update? please do enlighten us.. thank you

      -Haikal

      1. Martin Brinkmann said on November 17, 2017 at 7:13 am
        Reply

        It simply removes the cached update files but does not impact the system in any other way. It does not remove installed updates.

    3. Gavin said on November 17, 2017 at 2:26 am
      Reply

      Running Disk Clean-up as Admin will allow one to do this also.

      https://i.imgur.com/1hoqQCq.png

      1. Martin Brinkmann said on November 17, 2017 at 7:12 am
        Reply

        Thanks for the tip. This never worked reliably for me though.

    4. Jeff said on November 17, 2017 at 7:42 am
      Reply

      SoftwareDistribution\Download folder is never cleaned by Disk Cleanup. It only cleans WinSxS.

      1. Gabriel said on November 17, 2017 at 8:08 am
        Reply

        I’ve been noticing an influx of very very rude people here lately. Hope they go away soon… or learn to be polite.

    5. John C. said on November 17, 2017 at 1:02 pm
      Reply

      Windows update working in the background without the end users having any say about it, no information being provided about what the updates are…
      Along with totally obnoxious and unacceptable telemetry, these are all reasons that I’ll never touch Windows 10 with a barge pole.

    6. David Millians said on November 17, 2017 at 4:22 pm
      Reply

      You’ll have better luck if you turn off the windows update service before you try this. Sometimes you may have to stop other services, but usually that’ll do the trick by itself. For particularly pernicious cases, I have a script to do all of it. It also clears out catroot:
      net stop wuauserv
      net stop bits
      net stop cryptSvc
      net stop msiserver

      erase /F /S /Q c:\windows\softwaredistribution\*.*
      rmdir /S /Q c:\windows\softwaredistribution
      erase /F /S /Q c:\windows\System32\catroot2\*.*

      net start wuauserv
      net start bits
      net start cryptSvc
      net start msiserver

      (just realized I need to add the old catroot folder in there too. Sorry…)
      /fighting the windows update wars every day…

    7. kokos said on November 18, 2017 at 10:16 am
      Reply

      Cant you do something similar with DISM?

    8. TelV said on November 19, 2017 at 1:29 pm
      Reply

      Easier just to rename the SoftwareDistribution file. The OS will rebuild it again on the next reboot.

      You’ll need to run “net stop wuauserv” and “net stop BITS” first of course, but then run: “rename c:\windows\SoftwareDistribution softwaredistribution.old” (all without quotes) from the same elevated command prompt.

      Restart wuauserv and BITS again afterwards and then reboot the system.

    9. classicggma said on November 20, 2017 at 8:28 pm
      Reply

      Okay, tech-challenged senior here…am running Win7, do I need to do this? Is it really something I should try? Or is this for Win10 only? The title should reflect if it’s only Win10. Is this something I even really need? Is it better left to the tech people who know what they’re doing and can understand everything in this description? I have very little idea what these comments are even about.

      1. Martin Brinkmann said on November 20, 2017 at 8:34 pm
        Reply

        You don’t need to clean the folder usually. There are some exceptions: a) if you run into update issues as described in the article, b) if you want to clear up space after all updates are installed properly and leftover files are still in the folder.

        This works in all recent versions of Windows, not only in Windows 10. Just try and open C:\WINDOWS\SoftwareDistribution\Download in Explorer and see if you get a listing of folders or files.

        1. SusanB said on December 1, 2017 at 3:39 am
          Reply

          Wow! I just did that and cleaned up over 300MB! Thanks for the tip.

    10. Keith R. Starkey said on November 20, 2017 at 9:09 pm
      Reply

      Wait…
      >You can re-run a check for updates once all files have been deleted. Please note that Windows Update will download all updates anew when you clear the update cache. This can lead to Gigabyte large downloads.

      So, if I clear out the C:\WINDOWS\SoftwareDistribution\Download folder and then my system checks for updates on its own (say the next day), is it going to redownload EVERYTHING again?

      If so, how the heck can you clean this out without it doing that? or is that not necessary?

      1. Martin Brinkmann said on November 20, 2017 at 9:13 pm
        Reply

        Keith, only updates that have not been installed. Installed updates are left untouched.

        1. Keith R. Starkey said on November 21, 2017 at 4:15 pm
          Reply

          Great, thanks, Martin. Wondering, then, if there’s a way to figure out which have not been installed so you can just leave those. But thanks again.

    11. GeneralGeorge said on November 20, 2017 at 9:36 pm
      Reply

      I did this. There was less than 10meg in it. not really worth the trouble

      1. Keith R. Starkey said on November 21, 2017 at 4:24 pm
        Reply

        I had 975 MG! I’ve cleaned it out, but I know what’s going to happen: Windows is going to download those stupid third-party drivers and what have you, and I’ll have to deal with that again.

    Leave a Reply