Questions? Feedback? powered by Olark live chat software
Knowledgebase
Author Avatar

Cleaning Up Disk Space on Windows

Written by: on 02 July 2023 09:10 AM 02 July 2023 09:10 AM

Read this knowledge base article & know how to clean up disk space on windows & free it by removing outdated updates.

If your Windows installation is using a lot of disk space for the system, you can easily clean it up and free disk space by removing outdated updates. By default Windows keeps a store of all updates downloaded. Over time this can use a lot of disk space.

Removing the updates means it's not possible to uninstall updates, but it does free a lot of disk space.

Windows 2012 R2 and Higher

To do this open a powershell window and type the command:

Dism.exe /online /cleanup-image /StartComponentCleanup /resetbase

This may take a few hours depending on how many outdated updates your system has stored.

Then type the following commands if you wish to delete any windows update files that have been downloaded:

net stop wuauserv
net stop bits
del c:\windows\SoftwareDistribution /q /s
net start wuauserv
net start bits

For full information see: https://blogs.technet.microsoft.com/askpfeplat/2015/02/09/how-to-reduce-the-size-of-the-winsxs-directory-and-free-up-disk-space-on-windows-server-2012-r2-and-windows-8-1-or-do-we-even-need-to/

Windows 2008 R2

1. Download and install this hotfix on your system: https://www.microsoft.com/en-us/download/details.aspx?id=42739

2. Download the powershell script available here: https://gallery.technet.microsoft.com/scriptcenter/CleanMgrexeKB2852386-83d7a1ae to c:\

3. Open a cmd prompt and type: powershell -ExecutionPolicy ByPass
This will allow your powershell to run the script you just downloaded
Then run the script by typing: c:\cleanup-disk.ps1

(0 vote(s))
Helpful
Not helpful