Dustman: A Windows Local Cleanup Tool Written in PyQt
Dustman is a local cleanup tool for Windows, a GUI panel written in PyQt. It pulls the chores you’d normally handle by typing commands or digging through settings, clearing junk, fixing networking, tuning performance, into a single interface: point, click, done. Everything runs locally, no bundled bloatware, no data sent to the cloud.
Cleanup covers the spots where junk piles up the most: the various TEMP/TMP dirs, Windows Temp, LocalAppData temp directories, Recent, INetCache, the Chrome cache, Prefetch, and the DirectX shader cache. You can do a one-click deep clean or clear just a single item. Every irreversible operation like deleting or modifying gets scanned and listed out for you first; nothing is deleted until you say so, no cleaning blind. That habit was earned the hard way, from deleting the wrong file.
Network repair is the part I use the most. When a proxy or DNS goes haywire, it comes down to the same handful of commands at the bottom, ipconfig /release, /renew, netsh int ip reset all, flushing DNS, resetting Winsock, resetting the PAC, and I wrapped all of them into buttons. While I was at it I added DNS management: presets for Google, Cloudflare, 114, Alibaba, and Tencent that you can switch between primary and backup directly, plus a speed test so latency and packet loss are laid out at a glance and you can see which one is fastest.
Performance is more like a mental massage: kill processes to free up memory, then use powercfg to switch to the Ultimate Performance plan. The panel also carries live CPU and memory gauges, backed by psutil running a background thread to collect the data.
The UI uses PyQt5 plus PyQt-Fluent-Widgets, since I wanted the Fluent look without drawing the controls myself. The heavy lifting is basically calling into Windows’ built-in ipconfig, netsh, ping, powercfg, and reg; Python just handles the orchestration and the shell around them. The whole app is a single main.py, with config stored locally in config.json. A single file sounds crude, but for one-person maintenance it’s actually smoother, and whatever I want to add I just stuff right in. Once dependencies are installed, python main.py starts it. Network repair, deep cleanup, and switching power plans need admin privileges, so remember to open your terminal as administrator.