Disk Cleanup not freeing disk space

Page 1 of 2 12 LastLast

  1. Posts : 55
    Windows 10 Pro
       #1

    Disk Cleanup not freeing disk space


    I'm running Windows 10 on a Bootcamp'd MacBook Pro with 256G of SSD of which about 135G is allocated to the Windows partition (according to Properties in Explorer). It is running low on available space (4.06GB available) and Windows updates cannot be installed. Tried Disk Cleanup as Administrator and it shows 6.93GB in Windows Update Cleanup but it doesn't free up that space.
    WinDirStat shows C: drive size as 153.8GB of which 99.6GB is used by Windows. Is that normal?
    The disk is already compressed. What can I do to clean up the disk space used by Windows Update?
    Thank you.
      My Computer


  2. Posts : 5,330
    Windows 11 Pro 64-bit
       #2

    With this batch script you can delete temporary files.

    Code:
    :: Batch Script Created by FreeBooter
    
    @Echo Off & Cls
    
    Call :IsAdmin
    
    Mode CON LINES=5 COLS=50 & Color 0E
    
    Echo                   PLEASE WAIT... 
    
    :: This command deletes the oldest shadow copy on drive C
    vssadmin delete shadows /for=c: /oldest 2>&1 >nul
    
    ::Creating System Restore point 
    Wmic.exe /Namespace:\\root\default Path SystemRestore Call CreateRestorePoint "Before Deleting Temp Files", 100, 12 
    
    
    ::    CLEANUP STAGE
    Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Temporary Files"  /v LastAccess /t REG_DWORD /d "0" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Active Setup Temp Folders" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\BranchCache" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Downloaded Program Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Internet Cache Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Memory Dump Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Old ChkDsk Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Previous Installations" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Recycle Bin" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Service Pack Cleanup" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Setup Log Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\System error memory dump files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\System error minidump files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Temporary Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Temporary Setup Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Thumbnail Cache" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Update Cleanup" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Upgrade Discarded Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\User file versions" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Defender" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Error Reporting Archive Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Error Reporting Queue Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Error Reporting System Archive Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Error Reporting System Queue Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows ESD installation files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Windows Upgrade Log Files" /v "StateFlags0064" /t REG_DWORD /d "2" /f 2>&1 >nul
    
    
    
    Cls & Mode CON  LINES=10 COLS=50 & Color 1E & Title Created by FREEBOOTER
    Echo.
    Echo.
    Echo. 
    Echo.
    Echo.
    Echo.
    Echo.
    Echo.
    Echo.
    Echo.
    Echo.
    Echo. 
    Echo.
    Echo.
    Echo.
    Echo           ษออออออออออออออออออออออออออป 
    Echo           บ DELETING TEMPORARY FILES บ  
    Echo           ศออออออออออออออออออออออออออผ
    Echo.
    Taskkill  /IM Explorer.exe /f > nul
    CLEANMGR /sagerun:64 
    
    
    
    Cls
    :: Clear Temporary Folder.
    Cd %TMP% 
    For /f "tokens=*" %%a in ('Dir /b %LOCALAPPDATA%\Temp') do (
    Echo Y | Rd /s /q "%%a" 2>NUL 1>NUL 
    If Exist "%%a" Echo Y | Del /a /f "%%a" 2>NUL 1>NUL 
    )
    Echo. 
    Echo.
    Echo.
    Echo.
    Echo. 
    Echo.
    Echo.
    Echo.
    Echo. 
    Echo.
    Echo.
    Echo.
    Echo. 
    Echo        FINNISH DELETING TEMPORARY FILES 
    Echo.
    Echo.
    ping -n 6 localhost >Nul
    
    
    
    Cls & Mode CON  LINES=12 COLS=80 & Color 1E & Title Created by FREEBOOTER
    
    Cd  %SystemRoot%\System32
    
    Net Start TrustedInstaller 2>NUL 1>NUL
    
    Reg QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName | find /i "Windows 8" >Nul
    If Not Errorlevel 1 (
    Dism /Online /Cleanup-Image /StartComponentCleanup /ResetBase
    ) Else (
    Reg QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName | find /i "Windows 8.1" >Nul
    If Not Errorlevel 1 (
    Dism /Online /Cleanup-Image /StartComponentCleanup /ResetBase
    ) Else (
    Reg QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName | find /i "Windows 10" >Nul
    If Not Errorlevel 1 (
    Dism /Online /Cleanup-Image /StartComponentCleanup /ResetBase
    ) Else (	
    Goto :Event_Log
    ) ) )  
    
    Ping -n 4 localhost >Nul
    
    Goto :Event_Log
    
    
    
    
    :IsAdmin
    Reg query "HKU\S-1-5-19\Environment"
    If Not %ERRORLEVEL% EQU 0 (
     Cls & Mode CON  LINES=5 COLS=48 & Color 0C & Title - WARNING -
     Echo.
     Echo. 
     Echo  YOU MUST HAVE ADMINISTRATOR RIGHTS TO CONTINUE 
     Pause >Nul & Exit
    )
    Cls
    Goto :EOF
    
    
    
    :Event_Log
    Cls
    Mode CON  LINES=33 COLS=85
    For /F "tokens=*" %%G in ('wevtutil.exe el') DO (call :do_clear "%%G")
    Echo.
    Echo                    Event Logs Have Been Cleared!
    Start Explorer.exe
    Ping -n 5 127.0.0.1 >Nul
    Goto :eof
    :do_clear
    Echo clearing %1
    wevtutil.exe cl %1
    Goto :eof
      My Computer


  3. Posts : 9,792
    Mac OS Catalina
       #3

    Did you look at the MacOS partition to see how much of that is being used and if you can offload any documents and such to iCloud . Since you are pretty much using up all of the Windows Partition, what files do you have stored in that partition that you can offload to a Cloud Storage or external drive.
      My Computer


  4. Posts : 55
    Windows 10 Pro
    Thread Starter
       #4

    bro67 said:
    Did you look at the MacOS partition to see how much of that is being used and if you can offload any documents and such to iCloud . Since you are pretty much using up all of the Windows Partition, what files do you have stored in that partition that you can offload to a Cloud Storage or external drive.
    I have space available in the MacOS partition but my space needs are in the Windows partition. Is it normal for Windows to take up almost 100GB of disk space?
    I am looking into replacing the native 250GB SSD with a larger SSD and am still trying to figure out if there is a way to restore everything intact to the new drive without having to reinstall Windows and other licensed apps.
      My Computer


  5. Posts : 14,022
    Win10 Pro and Home, Win11 Pro and Home, Win7, Linux Mint
       #5

    The way I'd try is with an Eaxer dock, it accommodates either 2 x 2.5" or 2 x 3.5" drives or a mix. It will clone a Source drive to a Destination drive BUT it will not change partition sizes, will leave unallocated space. An example of one I did was 250GB to a 1TB drive but I had about 750GB extra that I used Disk Management to create a second/D: partition. The dock works WITHOUT being plugged into a computer, strictly byte by byte. Whether that would work in your situation is questionable but the Source will not be changed at all.
      My Computers


  6. Posts : 9,792
    Mac OS Catalina
       #6

    rmk9785e said:
    I have space available in the MacOS partition but my space needs are in the Windows partition. Is it normal for Windows to take up almost 100GB of disk space?
    I am looking into replacing the native 250GB SSD with a larger SSD and am still trying to figure out if there is a way to restore everything intact to the new drive without having to reinstall Windows and other licensed apps.
    Depends on what you have installed, same with double checking your MacOS partition.
      My Computer


  7. Posts : 55
    Windows 10 Pro
    Thread Starter
       #7

    bro67 said:
    Depends on what you have installed, same with double checking your MacOS partition.
    What I have installed and would like to continue using are primarily Windows 10. MS Office 2013, Visio 2010 and Adobe Acrobat X Pro.
    I'm sorry if I appear dense but I'm not understanding what I should be double checking in the MaxOS partition. I rarely use it and have adequate free space available in that partition. This laptop has been a workhorse in performance and reliability and still performs like it did when it was purchased.
      My Computer


  8. Posts : 14,022
    Win10 Pro and Home, Win11 Pro and Home, Win7, Linux Mint
       #8

    One caveat, years ago I tried to move Acrobat from one computer to another and found I should have deactivated the first before trying the move. Spent hours getting Adobe to fix it.
      My Computers


  9. Posts : 55
    Windows 10 Pro
    Thread Starter
       #9

    Berton said:
    The way I'd try is with an Eaxer dock, it accommodates either 2 x 2.5" or 2 x 3.5" drives or a mix. It will clone a Source drive to a Destination drive BUT it will not change partition sizes, will leave unallocated space. An example of one I did was 250GB to a 1TB drive but I had about 750GB extra that I used Disk Management to create a second/D: partition. The dock works WITHOUT being plugged into a computer, strictly byte by byte. Whether that would work in your situation is questionable but the Source will not be changed at all.
    I understand that Apple's SSD interface is different from the standard SATA III interfaces. Does this doc accept Apple branded SSDs?
    Additionally, Amazon lists this doc currently unavailable. Any other source?
      My Computer


  10. Posts : 14,022
    Win10 Pro and Home, Win11 Pro and Home, Win7, Linux Mint
       #10

    The Eaxer takes only SATA [apparently all speeds] and only works disconnected from a computer. I'd guess the newer macOS uses either NVME or M.2 drives.
      My Computers


 

  Related Discussions
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 08:53.
Find Us




Windows 10 Forums