Cache and temporary data increase after resetbase command


Sheikh

Software Developer
Member
Local time
7:16 PM
Posts
312
Location
Tehran, IRAN.
OS
Windows 11 Pro 24H2
After using restorehealth and startcomponentcleanup /resetbase commands, it increased cache and temporary size! Why? How to solve it?
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
I’d probably simply never run /ResetBase
It permanently removes all superseded versions of every component in the component store. This action prevents you from uninstalling any installed Windows updates.

You want to retain rollback capability? /ResetBase removes that.

After using restorehealth and startcomponentcleanup /resetbase commands, it increased cache and temporary size! Why? How to solve it?

You could try to opening Command Prompt as Administrator, then run:

Code:
net stop wuauserv
net stop bits
rd /s /q %windir%\SoftwareDistribution\Download
net start bits
net start wuauserv

What It Does
  • Stops Windows Update and BITS services
  • Deletes cached Windows Update downloads
  • Restarts the services

Then use Disk Cleanup (or cleanmgr)
  1. Press Windows+R, type: cleanmgr
  2. Select your system drive (usually C:)
  3. Click “Clean up system files”
  4. Check:
    • Windows Update Cleanup
    • Temporary files
    • Delivery Optimization Files
    • System error memory dump files (if you're sure you don't need them)
  5. Click OK and let it run.

If you want to automate cleanup more aggressively, try (CMD Admin):

Code:
cleanmgr /sagerun:1

OR if you’re game (I haven’t run this as I have no PC where I am currently) :


Powershell:
Stop-Service -Name wuauserv -Force -ErrorAction SilentlyContinue
Stop-Service -Name bits -Force -ErrorAction SilentlyContinue
Remove-Item -Path "$env:windir\SoftwareDistribution\Download\*" -Recurse -Force -ErrorAction SilentlyContinue
DISM /Online /Cleanup-Image /StartComponentCleanup /ResetBase

$cleanmgrKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches"
$itemsToClean = @(
    "Temporary Files",
    "Windows Update Cleanup",
    "System error memory dump files",
    "System archived Windows Error Reporting",
    "Downloaded Program Files",
    "Temporary Setup Files",
    "Internet Cache",
    "Delivery Optimization Files",
    "Old ChkDsk Files",
    "Recycle Bin",
    "Temporary Sync Files"
)
foreach ($item in $itemsToClean) {
    $regPath = Join-Path $cleanmgrKey $item
    if (Test-Path $regPath) {
        Set-ItemProperty -Path $regPath -Name "StateFlags0001" -Value 2 -Force
    }
}
Start-Process cleanmgr.exe -ArgumentList "/sagerun:1" -Wait
Start-Service -Name wuauserv
Start-Service -Name bits

  • Open Notepad
  • Paste the code above.
  • Save the file as:
    CleanSystem.ps1
    (Be sure to select "All Files" in the Save As type dropdown, not .txt)

If you get a security error, run this in PowerShell first (as admin):

Powershell:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

Then re-run the CleanSystem.ps1 script.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 Build 22631.5624
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    5 x LG 25MS500-B - 1 x 24MK430H-B - 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list.
    OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech: G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    1000/400Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 23H2 Build: 22631.4249
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Intel Iris Xe Graphics Processor
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.
 

My Computer

System One

  • OS
    Windows 11 Pro Insider 64 bit 25H2 26200.5670
    Computer type
    PC/Desktop
    Manufacturer/Model
    Gigabyte Z390 UD
    CPU
    Intel Core i7 9700K 3.60
    Motherboard
    Gigabyte Z390 UD
    Memory
    16 GB
    Graphics Card(s)
    nVidia GEForce RTX 2060 Super
    Sound Card
    onboard
    Monitor(s) Displays
    Two 27" Dell 4K monitors
    Screen Resolution
    3840 x 2160
    Hard Drives
    M.2 NVME SSD, 500 GB; Two 2TB Mechanical HDD's
    PSU
    850w PSU
    Case
    Cyberpower PC
    Cooling
    Water cooled
    Keyboard
    Backlit Cyberpower gamiong keyboard
    Mouse
    Backlit Cyberpower gaming mouse
    Internet Speed
    1 GB mbps
    Browser
    Brave
    Antivirus
    Windows Security
Thanks guys.
I ran startcomponentcleanup and the used resetbase in next command. Temp size increases everytime I run these two commands! What’s going on in the background?
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
The DISM commands address the size of WinSxS, but they don't affect any temp folders to make them smaller.

Cache folder != WinSxS folder
 

My Computer

System One

  • OS
    Windows 7
The DISM commands address the size of WinSxS, but they don't affect any temp folders to make them smaller.

Cache folder != WinSxS folder
So how can I clear the temp folder? it was 0KB but after running resetbase command it increased to 1GB ...
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender

Latest Support Threads

Back
Top Bottom