Skip to main content

Delete registry keys, registry value/ value_names, path entries, and often used installation directories based on a string search.

Project description

Win_purge

It is a very bad idea to run Python code from the internet that modifies the Windows Registry. Minor bugs in Win_purge can be critical - any could inadvertantly cripple your system. Win_purge can delete important registry keys if you let it - I do not know the purpose of every Registry key, and there is no special treatment of any Windows edition or setups (the code can quickly become out of date - the frequency of automatic Windows updates in the modern age, means Win_purge could have become inadvertantly unsafe at any point in time).

I draw your attention to the last paragraph of the MIT license:

"THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."

That said, if you accept the risk, then win_purge has been designed to take the following steps to protect your system, based on a simple text search:

  • Refuses to run if a matching registered uninstaller is found (as this should be run instead).

  • Uses exactly the same search code for a safe dry run, as for a run that deletes matching keys - no surprising results.

  • Requires a special force switch on the CLI to delete and modify keys.

  • Prompts for confirmation, skip or quit (y/n/quit respectively) before each change.

  • Tries to identify system path keys. In recognised path keys, win_purge modifies the path name/data in the value instead (removing matching paths from the system wide path and from the user's path).

  • Backs up each key before modification or deletion (with reg export), and consolidates the backups after each session.

  • Uses send2trash to send the temporary key back up files to the Recycle Bin (does not permanently delete them).

  • Win_purge can also delete matching application files from common installation directories.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

win_purge-0.0.1.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

win_purge-0.0.1-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file win_purge-0.0.1.tar.gz.

File metadata

  • Download URL: win_purge-0.0.1.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.20

File hashes

Hashes for win_purge-0.0.1.tar.gz
Algorithm Hash digest
SHA256 391ccaee3dcbbee85e7852a7d83e520fd31d084c07b2eec62db06075e582fd75
MD5 e5b538b042f73bd34d0d65f1ce47ea00
BLAKE2b-256 367fdf00e27b458087364078bb97e04db1bab0fba7a7f4bd55435182202b56b2

See more details on using hashes here.

File details

Details for the file win_purge-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: win_purge-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.20

File hashes

Hashes for win_purge-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 75c0dab3d5613124eb957a2d22e240cebe184448943e5d37bae8a01601f8a314
MD5 1bd054dcc90db50feb21ac0e2d959e41
BLAKE2b-256 bc590412eb126e3ca267d5aef033345349df36baaf1cbad96776761934c058a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page