CleanUp your System is a high-performance system maintenance script specifically tuned for modern gaming laptops and developer workstations. Originally designed for the Lenovo Legion 5 (i5-13450HX | RTX 4060 | NVMe SSD), it performs a deep 9-stage cleanup of temporary files, developer caches, browser data, and graphics subsystems — keeping your hardware running at peak performance.
- ✨ Features
⚠️ Prerequisites- 📥 Installation
- 🚀 How to Run
- 🔧 What It Does (9 Stages)
- 📊 Post-Optimization Report
- 📄 License
- 👨💻 Author
| Icon | Feature | Description |
|---|---|---|
| 🧹 | Deep Temp Cleanup | Flushes both system (C:\Windows\Temp) and user (%temp%) temporary files |
| 📦 | Developer Cache Purge | Safely cleans npm, pip, and Ollama logs without affecting your local AI models |
| 🔄 | Windows Update Cache | Stops the Update service, clears the SoftwareDistribution download cache, and restarts it |
| 🎮 | GPU Shader Refresh | Rebuilds NVIDIA DXCache and DirectX Shader Cache to eliminate stuttering |
| 🌐 | Browser Deep Clean | Cleans Chrome & Edge caches across all profiles (not just Default) |
| 🗑️ | Recycle Bin Cleanup | Empties the Recycle Bin automatically |
| 🌍 | DNS Cache Flush | Clears stale DNS resolver entries for cleaner network lookups |
| 🖼️ | Thumbnail & Icon Cache | Properly kills explorer.exe to unlock and delete cache .db files, then restarts it |
| 💾 | NVMe SSD TRIM | Executes native TRIM commands for long-term SSD health and speed |
| 📝 | Smart Logging | Appends detailed reports to Cleanup_Report.txt on your Desktop (preserves history) |
| 📊 | Space Reclaimed Report | Shows exactly how much disk space was freed after cleanup |
| 📶 | Visual Progress Bar | Displays a real-time progress bar with percentage for each step |
| Error Tracking | Logs warnings for any operations that fail, with a summary at the end |
Before running the script, make sure you have:
✅ Windows 10 or Windows 11
✅ Administrator privileges — the script modifies system-level caches and services
✅ Git installed (only if you want to clone the repo — otherwise just download the file)
Open Command Prompt, PowerShell, or Git Bash and run:
git clone https://github.com/mogdho/CleanUp-your-system.gitThis will create a folder called CleanUp-your-system on your computer containing the cleanup.bat file.
CleanUp-your-system/
├── cleanup.bat ← The main script
├── README.md
└── LICENSE
- Go to the repository page
- Click the green
<> Codebutton - Select
Download ZIP - Extract the ZIP file anywhere on your PC
Follow these simple steps:
-
📂 Navigate to the folder where
cleanup.batis located -
🖱️ Right-click on
cleanup.bat -
🛡️ Select "Run as Administrator"
💡 Tip: If you see a Windows SmartScreen warning, click "More info" → "Run anyway"
-
⏳ Sit back and watch the 9-stage optimization process run automatically
-
✅ Done! Check the results on screen and find the full report on your Desktop
[████████████████████████████████████░░░░░] 89%
| Step | Stage | What Gets Cleaned |
|---|---|---|
| 1/9 | 🧹 System & User Temp | All files in %temp% and C:\Windows\Temp |
| 2/9 | 📦 Developer & AI Cache | npm cache, pip cache, Ollama logs |
| 3/9 | 🔄 Windows Update Cache | SoftwareDistribution\Download folder |
| 4/9 | 🎮 GPU Shader Cache | NVIDIA DXCache, DirectX D3DSCache |
| 5/9 | 🌐 Browser Cache | Chrome & Edge caches (all profiles) |
| 6/9 | 🗑️ Recycle Bin | All deleted files in the Recycle Bin |
| 7/9 | 🌍 DNS Cache | Stale DNS resolver entries |
| 8/9 | 🖼️ Thumbnail & Icon Cache | thumbcache_*.db and iconcache_*.db |
| 9/9 | 💾 NVMe SSD TRIM | Optimizes SSD block allocation |
Once the script finishes, you'll see:
- 📏 Space Reclaimed — exactly how much storage was freed (in MB or GB)
⚠️ Warning Count — how many operations had issues (if any)- ⏱️ System Uptime — how long since your last reboot
- 📄 Full Log — saved to
Cleanup_Report.txton your Desktop
⚠️ Note: Browsers (Chrome/Edge) will be closed during Stage 5 to ensure a deep cache clean. Save your work before running!
⚠️ Note: Windows Explorer will briefly restart during Stage 8 to clear locked thumbnail/icon cache files. Your taskbar will disappear for a moment — this is normal.
Distributed under the MIT License. See LICENSE for details.
Mogdho Paul
🔗 GitHub: github.com/mogdho 📂 Source: CleanUp-your-system