Home/ Projects/ Windows System Cleaner

Python Windows System Cleaner

A Python tool that automates and manually cleans temporary files, web cookies, browser caches, and other system clutter that accumulates on Windows machines over time.

TypePersonal Project
PlatformWindows
StatusOpen Source
[ Screenshot of CLI output ]

The problem

Windows accumulates a surprising amount of junk over normal use — temp files, browser caches, cookies, leftover installer artifacts. The built-in Disk Cleanup tool is limited and requires manual interaction every time.

The goal was a scriptable, programmable Python tool that could handle all of this automatically, with enough control to run selectively or in bulk.

What I built

DocPy is a Python-based CLI tool for cleaning out Windows system clutter. It supports both automated and manual modes, targeting the most common sources of bloat.

Temp files
%TEMP% and Windows\Temp
Web cookies
Chrome, Firefox, Edge
Browser cache
HTTP cache directories
Log files
Application and system logs
Prefetch
Windows prefetch cache
Thumbnails
Windows thumbnail cache

Technical decisions

The tool uses Python's os, shutil, and pathlib modules to navigate and clean Windows directory structures. Browser profile paths are resolved dynamically from the user's APPDATA environment, so the tool works across different Windows user accounts without hardcoded paths.

Automated mode runs all targets silently; manual mode prompts per category so the user retains control over what gets deleted. Both modes log what was removed and how much space was freed.

Python Windows Automation pathlib shutil

Outcome