Comprehensive Windows Cleanup Tool
WinTrim 2.0 is a powerful, modular cleanup tool that goes beyond simple duplicate removal. It intelligently cleans your Windows system across multiple areas while keeping your system safe and functional. Like Marie Kondo for your entire Windows installationโkeeping only what sparks joy (and functionality).
- 
Duplicate Programs (Original WinTrim)
- Removes old software updates and duplicate redistributables
 - Intelligent pattern matching and online version checking
 - Keeps different Visual C++ years and editions separate
 
 - 
Temp Files Cleanup
- Cleans system and user temporary directories
 - Safe removal of old temporary files
 - Typical savings: 1-10 GB
 
 - 
Windows Update Cache
- Clears Windows Update download cache
 - Safely stops and restarts update services
 - Typical savings: 5-20 GB
 
 - 
Browser Cache Cleanup
- Supports Brave, Chrome, Edge, and Firefox
 - Clears code cache and regular cache
 - Typical savings: 500 MB - 5 GB
 
 - 
System Cache Cleanup
- Thumbnail cache, shader cache, icon cache
 - Windows error reports and old logs
 - Prefetch files older than 7 days
 - Typical savings: 1-3 GB
 
 - 
Advanced DISM Cleanup
- Component store analysis and cleanup
 - Superseded component removal
 - Most thorough but slowest (10-30 minutes)
 - Typical savings: 2-10 GB
 
 
- Run all modules or pick specific ones
 - Easy-to-use menu interface
 - Each module runs independently with its own confirmation
 
- Comprehensive final statistics
 - Per-module breakdown
 - Time tracking
 - Total space freed across all modules
 
- Windows 10 or Windows 11
 - PowerShell 5.1 or later
 - Administrator privileges
 
- 
Download WinTrim
# Clone the repository git clone https://github.com/kdsmith10000/WinTrim.git cd WinTrim
 - 
Run as Administrator
- Right-click PowerShell
 - Select "Run as Administrator"
 - Navigate to the WinTrim directory
 - Run the script:
 
.\WinTrim.ps1
 
Simply run the script and follow the interactive prompts:
.\WinTrim.ps1The script will:
- โ Prompt to create a system restore point (recommended!)
 - ๐ Show available cleanup modules
 - ๐ฏ Let you select which modules to run (or run all)
 - ๐ Scan and analyze each selected module
 - ๐พ Display estimated disk space savings per module
 โ ๏ธ Ask for confirmation before each cleanup operation- ๐๏ธ Perform cleanup operations
 - ๐ Show comprehensive final statistics
 
Available modules:
  1. Duplicate Programs - Remove old software updates (original WinTrim)
  2. Temp Files - Clean system and user temp directories
  3. Windows Update Cache - Clear update download cache
  4. Browser Cache - Clear browser caches (Brave, Chrome, Edge, Firefox)
  5. System Cache - Clean thumbnails, logs, error reports, shader cache
  6. Advanced DISM - Component store cleanup (slow but thorough)
  A. All modules
  Q. Quit
Enter modules to run (e.g., '1,2,3' or 'A' for all):
Module 1: Duplicate Programs
- โ Visual C++ Redistributables (old versions of same year/edition)
 - โ Microsoft .NET Runtime (outdated versions)
 - โ Microsoft Edge Updates (old update helpers)
 - โ MongoDB, Java, Adobe updates (old versions)
 - โ NEVER removes different Visual C++ years (coexist by design)
 - โ NEVER removes Python components (part of one installation)
 - โ NEVER removes single installations
 
Module 2-6: System Cleanup
- Temporary files (system and user)
 - Windows Update download cache
 - Browser caches (all major browsers)
 - Thumbnail, shader, and icon caches
 - Windows error reports and old logs
 - Superseded Windows components (DISM)
 
========================================
  WinTrim v2.0
  Comprehensive Windows Cleanup
========================================
Available modules:
  1. Duplicate Programs - Remove old software updates (original WinTrim)
  2. Temp Files - Clean system and user temp directories
  3. Windows Update Cache - Clear update download cache
  4. Browser Cache - Clear browser caches (Brave, Chrome, Edge, Firefox)
  5. System Cache - Clean thumbnails, logs, error reports, shader cache
  6. Advanced DISM - Component store cleanup (slow but thorough)
  A. All modules
  Q. Quit
Enter modules to run (e.g., '1,2,3' or 'A' for all): A
Modules to run:
  โ Duplicate Programs
  โ Temp Files
  โ Windows Update Cache
  โ Browser Cache
  โ System Cache
  โ Advanced DISM
========================================
  MODULE: Temporary Files Cleanup
========================================
Scanning temp directories...
Total potential space to free: 3.45 GB
Proceed with temp files cleanup? (Y/N) Y
Temp Cleanup Results:
  Files removed: 15,234
  Space freed: 3.45 GB
... [other modules run] ...
========================================
  WinTrim Cleanup Complete!
========================================
FINAL STATISTICS:
-------------------
Total space freed: 24.67 GB
Programs removed: 8
Temp files removed: 15,234
Time elapsed: 12m 34s
CLEANUP BY MODULE:
-------------------
Temp Files: 15,234 files removed
Windows Update: 8.23 GB
Browser Cache: 4.12 GB
System Cache: 2.34 GB
Duplicate Programs: 8 removed
DISM Cleanup: 6.53 GB
If you encounter execution policy errors:
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
.\WinTrim.ps1You can modify the $patterns array in the script to add your own software patterns:
$patterns = @(
    "Microsoft Edge",
    "Your Custom Pattern"
)After cleanup, WinTrim provides:
REMOVAL STATISTICS:
-------------------
Programs targeted for removal: 8
Successfully removed: 8
Failed to remove: 0
DISK SPACE SAVINGS:
-------------------
Total disk space freed: 102.95 MB
ESTIMATED MEMORY SAVINGS:
-------------------------
Potential RAM savings: ~600 MB
(Old update services no longer running)
ADDITIONAL BENEFITS:
--------------------
- Cleaner Add/Remove Programs list
- Reduced registry clutter
- Faster system scans and updates
- โ Requires Administrator Privileges: Prevents unauthorized execution
 - โ No Internet Dependencies: Works offline (uses cached version data as fallback)
 - โ No Data Collection: Completely private, nothing sent anywhere
 - โ Open Source: Fully auditable code
 
WinTrim has been designed with security in mind:
- No arbitrary code execution: Only uses uninstall strings from registry
 - Input validation: All registry data is validated before use
 - Safe defaults: Conservative approach, keeps items when in doubt
 - Restore point integration: Easy rollback if needed
 
- Create a backup of important data
 - Close all programs before running
 - Read the preview carefully before confirming removal
 - Accept the restore point prompt (strongly recommended)
 
- Some programs may fail to uninstall silently (exit code 1603)
 - Requires manual intervention for programs with custom uninstallers
 - Online version checking requires internet connection (falls back to cached data)
 
# Use full path
C:\path\to\WinTrim.ps1Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope ProcessRight-click PowerShell โ "Run as Administrator"
Check the exit code in the output. Common codes:
1603: Installation failed (dependency issue)1605: Product not found (already removed)
Contributions are welcome! Please feel free to submit a Pull Request.
- ๐ Additional online version sources
 - ๐ฏ More software patterns
 - ๐ Internationalization
 - ๐ Documentation improvements
 - ๐ Bug fixes
 
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by the need for safer Windows cleanup tools
 - Built with feedback from the Windows power user community
 - Thanks to all contributors and testers
 
- Issues: GitHub Issues
 - Discussions: GitHub Discussions
 
- Modular cleanup system
 - Temp files cleanup
 - Windows Update cache cleanup
 - Browser cache cleanup
 - System cache cleanup
 - DISM component cleanup
 - Comprehensive statistics and reporting
 
- GUI version
 - Scheduled cleanup tasks
 - Export/import cleanup profiles
 - Detailed HTML/JSON reports
 - Per-module rollback
 - Portable version (no installation required)
 - Recycle Bin cleanup module
 - Windows.old removal module
 - Driver store cleanup
 - More granular control per cleanup type
 
Made with โค๏ธ for the Windows community
WinTrim - Keep your Windows installation lean and clean!



