PC Cleaner is a simple tool to clean your PC from junk files. It is written in Python and uses a configuration file to determine which files/directories or registry keys to delete.
- Clone this repository
- Edit the configuration file
config.json
to your needs - Run
python cleanUp.py
The files
section of the configuration file contains a list of files and directories to delete. The paths are relative to the current working directory. The files
section looks like this:
"files": [
{
"item": "%APPDATA%\\Microsoft\\Windows\\Recent\\",
"type": "REMOVESELF"
}]
The item
key contains the path to the file or directory. The type
key contains the type of the item. The following types are supported:
REMOVESELF
: Remove the file or directory itselfRECURSE
: Remove the file or directory and all its contentsWILDCARD
: Remove all files matching the wildcard pattern
The services
section of the configuration file contains a list of services to stop before the cleanup (in order to delete files that are in use).
The services
section looks like this:
"services": [
"Windows Search"
]
The registry
section of the configuration file contains a list of registry keys to delete. The registry
section looks like this:
"regKeys": [
"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RunMRU"
]
- cleanJournals: If set to
true
, the Windows Event Logs will be cleared - restartPc: If set to
true
, the PC will be restarted after the cleanup