Question What on the Windows system actually needs to be cleaned?

Please provide comments and solutions that are helpful to the author of this topic.
Y'all are boring! I say remove as much of the unneeded boat as I can. Things I clean before imaging with Hasleo Backup Suite:

  1. Edge and webview Why keep things I have no intention of ever using?
  2. Browser histories/caches
  3. .dmp files
  4. Windows security cache/logs
  5. Temp directories
  6. Windows Logs
  7. DirectX Cache
  8. Nvidia Cache
  9. Outdated WinSxS

That why I can image my system partitions in 30 seconds, and reimage in 27 when needed. Nothing is broken, everything works perfectly fine.

I full image in 21 seconds :love::love:

Image.jpg
 
Y'all are boring! I say remove as much of the unneeded boat as I can. Things I clean before imaging with Hasleo Backup Suite:

  1. Edge and webview Why keep things I have no intention of ever using?
  2. Browser histories/caches
  3. .dmp files
  4. Windows security cache/logs
  5. Temp directories
  6. Windows Logs
  7. DirectX Cache
  8. Nvidia Cache
  9. Outdated WinSxS

That why I can image my system partitions in 30 seconds, and reimage in 27 when needed. Nothing is broken, everything works perfectly fine.
Did you clean it manually or do you recommend a specific program?
 
  • Like
Reactions: Sorrento
Ummm, both?

Here's the custom .bat file I wrote to do it. Each section has a description that tells you what it does. It needs to be run as admin. IMAGE BEFORE YOU RUN THIS SCRIPT!


Code:
@echo off
title Windows Cleanup Utility
color 0A
setlocal enabledelayedexpansion

:: Admin check
net session
if %errorlevel% neq 0 (
    echo This script requires administrator privileges.
    pause
    exit /b
)

echo Starting system cleanup...
echo.

echo Killing Explorer.exe...
taskkill /f /im explorer.exe

echo Deleting all thumbnail cache files...
rem Removes cached thumbnail images to free up space
del /f /s /q /a %LocalAppData%\Microsoft\Windows\Explorer\thumbcache_*.db

echo Deleting all temporary files...
rem Cleans up temporary files to free up disk space
del /q/f/s %TEMP%\*

echo Deleting Windows Prefetch files...
rem Clears prefetch cache to improve performance
del /q /f /s C:\Windows\Prefetch\*

:: Browser caches
echo Cleaning browser caches and histories...
taskkill /f /im firefox.exe
taskkill /f /im vivaldi.exe
taskkill /f /im waterfox.exe
taskkill /f /im floorp.exe
taskkill /f /im catsxp.exe

REM Replace 'YourUsername' with your actual Windows username if needed
SET "VIVALDI_USER_DATA=%LOCALAPPDATA%\Vivaldi\User Data"

REM Delete Cache
echo Deleting Vivaldi cache...
rd /s /q "%VIVALDI_USER_DATA%\Default\Cache"
rd /s /q "%VIVALDI_USER_DATA%\Default\Code Cache"
rd /s /q "%VIVALDI_USER_DATA%\Default\GPUCache"
rd /s /q "%VIVALDI_USER_DATA%\Default\Media Cache"

REM Delete History and Cookies
echo Deleting Vivaldi history and cookies...
del /f /q "%VIVALDI_USER_DATA%\Default\History"
del /f /q "%VIVALDI_USER_DATA%\Default\Cookies"

echo Vivaldi cache and history cleaned

rd /s /q "%LOCALAPPDATA%\Mozilla\Firefox\Profiles"
rd /s /q "%LOCALAPPDATA%\Vivaldi\User Data\Cache"
rd /s /q "%LOCALAPPDATA%\Waterfox\Profiles"
rd /s /q "%LOCALAPPDATA%\Floorp\Profiles"
rd /s /q "%LOCALAPPDATA%\CatsXP\User Data"

:: Temp files and logs
echo Cleaning temporary files and logs...
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.dmp
rd /s /q %temp%
mkdir %temp%

:: Windows components
echo Cleaning Windows components...
cleanmgr /sagerun:1
Dism.exe /online /Cleanup-Image /StartComponentCleanup
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
DISM.exe /online /Cleanup-Image /Restorehealth


:: Winsxs cleanup
echo Cleaning WinSxS...
Dism.exe /online /Cleanup-Image /AnalyzeComponentStore

:: Error reporting
echo Cleaning Windows Error Reporting...
rd /s /q "%ALLUSERSPROFILE%\Microsoft\Windows\WER"

:: DirectX cache
echo Cleaning DirectX cache...
rd /s /q "%LOCALAPPDATA%\Microsoft\DirectX"

:: Nvidia cache
echo Cleaning Nvidia cache...
rd /s /q "%LOCALAPPDATA%\NVIDIA\DXCache"

:: Security cache
echo Cleaning Windows Security Cache and Logs...
wevtutil cl Security
echo Security logs cleared.

:: Clear Windows Defender cache
del /q /f "C:\ProgramData\Microsoft\Windows Defender\Support\*.*"
echo Windows Defender cache cleared.
echo Cleanup complete.

:: Recycle Bins
echo Emptying ALL Recycle Bins...
PowerShell Clear-RecycleBin -force -ErrorAction:Ignore

:: Windows Event Logs
echo Clearing Windows Event Logs...
FOR /F "tokens=1,2*" %%V IN ('bcdedit') DO SET admin=%%V
wevtutil cl Application
wevtutil cl Security
wevtutil cl System
echo All event logs have been cleared.

echo Restarting Explorer.exe...
START explorer.exe

echo.
echo Cleanup completed!
echo.

pause
 
Last edited:
I let Windows run by itself. I tried an optimizer once and it shaved milliseconds. So forget that, and i turn off visuals like menu slide down and transparency. Windows runs smoothly I am satisfied with it's performance. Those optimizers are selling snake oil. I was a utilities person back in the Win 7 days and before. And most importantly Win is not my primary rig anymore. I only need a browser, a document editor and spreadsheet, and I use only basic functions. Occasionally I use the 'notepad' of linux, it has multi-language syntax highlighting and finishes my brackets.
 
Last edited:
I let Windows run by itself. I tried an optimizer once and it shaved milliseconds. So forget that, and i turn off visuals like menu slide down and transparency. Windows runs smoothly I am satisfied with it's performance. Those optimizers are selling snake oil. I was a utilities person back in the Win 7 days and before.

Optimizers and cleaners are not the same thing, and don't have the same purpose.
 
The optimizer cleans out windows too in order to make Windows run faster. But it is not privacy focused.