Windows 10: Cleaning windows after update.

Page 2 of 2 FirstFirst 12
  1.    19 Apr 2017 #11

    While you can just delete large folders, the best way to regain space is by using the built in Disk Cleanup tool.
    Click Start and type 'Disk Cleanup'. Right-click the application that appears, and select 'Run as administrator'. Select the drive you want to clean up -- this should be your system drive -- and click OK.
    The tool will calculate how much space can be saved and then present you with a list of items that can be cleaned, including some very large ones.
      My ComputerSystem Spec

  2.    19 Apr 2017 #12

    Josey Wales said: View Post
    If you run it as Admin, it will automatically clean system files.
    Not quite. You still have to tick the boxes just not press the "cleanup system files" button.

    That is why people do the cleanmgr /sageset:65535 & cleanmgr /sagerun:65535 as it saves ticking the boxes.

    You can even script it to do the ones you want (if you didn't want it clear logs or empty the recycle bin or something).

    I'd give credit for this script but I forgot who I copied it off.
    # Folders Names which will been cleaned.  Note some of these (for example "RetailDemo Offline Content") are deleted from
    # the registry after first run.  Messages like "Key not found" are therefore not important and can be ignored.
    "Active Setup Temp Folders",
    "Content Indexer Cleaner",
    "Delivery Optimization Files",
    "Downloaded Program Files",
    "Internet Cache Files",
    #"Memory Dump Files",
    "Offline Pages Files",
    "Old ChkDsk Files",
    "Previous Installations",
    #"Recycle Bin",
    "RetailDemo Offline Content",
    "Service Pack Cleanup",
    "Setup Log Files",
    "System error memory dump files",
    "System error minidump files",
    "Temporary Files",
    "Temporary Setup Files",
    "Temporary Sync Files",
    "Thumbnail Cache",
    "Update Cleanup",
    "Upgrade Discarded Files",
    "User file versions",
    "Windows Defender",
    "Windows Error Reporting Archive Files",
    "Windows Error Reporting Queue Files",
    "Windows Error Reporting System Archive Files",
    "Windows Error Reporting System Queue Files",
    "Windows Error Reporting Temp Files",
    "Windows ESD installation files",
    "Windows Upgrade Log Files")
    Write-Host "The following are selected to be cleaned by cleanmgr" -f cyan 
    For($i=0;$i -lt $TempFolders.Count; $i++) {
        $RegKey=$DirPath + "\" + $TempFolders[$i]
        $StateValue=(Get-ItemProperty $RegKey).$VName
        If ($?) {
            If ($Error.categoryinfo) {write-host "Key not found " -f red  -NoNewline; write-host ": " $TempFolders[$i] -f White}
            ElseIf (-not $StateValue) {
            New-ItemProperty -Path $RegKey -Name $VName -Value "2" -PropertyType "dword" | out-null
            write-host "Key added     " -NoNewline; write-host ": " $TempFolders[$i] -f White
        } Else {
        Set-ItemProperty -Path $RegKey -Name $VName -Value "2"
        write-host "Key updated   " -NoNewline; write-host ": " $TempFolders[$i] -f White
    Write-Host "End of List" -f cyan
    # 32 is a random number - just has to match $VName variable
    CLEANMGR /sagerun:32
    Write-Host  "Disk Cleanup running asynchronously..." -f white
      My ComputerSystem Spec

  3.    19 Apr 2017 #13

    robertosburn said: View Post
    While you can just delete large folders, the best way to regain space is by using the built in Disk Cleanup tool
    Deleting one large folder is obviously the best way to reclaim disk space. Deleting a 20GB Windows.old is more efficient than deleting lots of 3MB temp files.

    Disk Cleanup is a way to delete junk you don't need. As are the various other temp places mentioned earlier by @TairikuOkami

    I use CCleaner and TFC as well. They probably duplicate each other but never mind.

    There are lots of other interesting things you can do (most of which make no difference) but I would suggest that compression is the best way to reduce disk space and that it also improves performance (unless you have an exceptionally fast SSD and a really really poor CPU.

    Ignore what MS says and run Compact /compactOS:always

    Then run from admin prompt compact /c /s /a /f /q /i /exe:xpress16k for all your folders containing games or documents.

    It will certainly reduce the size and in my testing makes things faster in every situation (even with HDD)

    You may need to change xpress16K toxpress 8K if your CPU is weaker than your disk but doing anything is better than nothing.

    Just for your interest xpress4K is the default compression (which is used by /compactOS) and even that is faster in any situation I have tested.

    Just to make it clear, I'll put it in bold.

    Everything I've tested, including games, runs faster if it is compressed on disk irrespective of the hardware (SSD/CPU etc)

    Going back to not bold, you may want to check different compressions. Even NTFS compression is better than nothing though.
      My ComputerSystem Spec

Page 2 of 2 FirstFirst 12

Related Threads
I need suggestion about cleaning windows files with CCleaner, what files can i remove safely without damaging my OS. And which one should i checklist from menu. I am adding some screenshots.
Hi all, I have tried free and paid software to actually clean up my hard drive but then I go looking around in file explorer and see tons of entries such as windows temp directories chock full of files that add up pretty quickly. I presume...
There is usually a couple of impossible to delete files and folders that prevents Windows Cleanup program from getting rid of the Windows.old folder. To remove them, you need the file unlocker program: Download Unlocker 1.9.2 -
So I have left over the "Windows.old" file on my C drive, which is taking up 36.8GB of precious space. I know deleting this will prevent me from "going back to windows 7", the option in the settings. I have a Macrium reflect image of my C drive...
Cleaning Windows 7 in Performance & Maintenance
Apart form CCleaner I use commands in command prompt (elevated) cleanmgr/sagerun:1 and %SystemRoot%\System32\Cmd.exe /c Cleanmgr /sageset:65535 & Cleanmgr /sagerun:65535 My system runs very well so is this enough or do I need to use...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 12:54.
Find Us