Skip to main content

PyWipe

Language License Python Version

A command-line tool to reset your global Python environment.

pywipe acts as a 'factory reset' for your global Python installation, safely removing all user-installed packages while preserving essential ones like pip and setuptools. It's designed to clean up cluttered global environments without affecting your isolated virtual environments.


Why PyWipe?

Over time, your global Python space can become a tangled mess of packages from various projects, leading to version conflicts, slower startup times, and the infamous "it works on my machine" syndrome. Manually cleaning this up is tedious and risky. PyWipe automates this process, providing a safe and reliable "factory reset" button for your Python environment.


✨ Features

  • 🧹 Clean Global Environment: Uninstalls all packages installed in the global Python site-packages directory.
  • 🛡️ Essential Package Protection: Automatically whitelists critical packages (pip, setuptools, etc.) to ensure your Python installation remains functional.
  • ✅ Custom Whitelisting: Allows you to specify additional packages to keep using the --keep option.
  • 💾 Automatic Backup: Creates a timestamped backup file (pywipe_backup_YYYY-MM-DD_HH-MM-SS.txt) listing all installed packages before uninstallation, allowing for easy restoration if needed (though restoration is currently a manual process using pip install -r <backup_file>).
  • 👀 Dry Run Mode: Use the --dry-run flag to see exactly which packages would be uninstalled without actually performing the action.
  • ⚠️ Virtual Environment Safety: Prevents accidental execution inside a virtual environment, protecting your isolated project dependencies.
  • ✨ Rich Output: Provides clear, colorful console output using the rich library.

📚 Tech Stack

  • Python
  • Click: For building the command-line interface.
  • Rich: For beautiful and informative console output.
  • setuptools: Standard Python package building tools.

🚀 Installation

pywipe is a Python package and can be installed globally using pip:

pip install pywipe

Note: This tool is specifically designed for your global Python environment. Do not install or run it inside a virtual environment.


▶️ Usage

Run the pywipe run command to initiate the cleanup process.

pywipe run

You will be shown a list of packages to be uninstalled (excluding essential and whitelisted packages) and prompted for confirmation before proceeding.

Keep specific packages:

Use the --keep or -k option followed by the package name to prevent it from being uninstalled. You can specify this option multiple times for different packages.

pywipe run --keep my-essential-tool --keep another-package-to-keep

Dry run:

To see which packages would be uninstalled without actually uninstalling them, use the --dry-run flag.

pywipe run --dry-run

Restore: Easy Restoration: Quickly reinstall all packages from a backup file using the restore command.

pywipe restore --from pywipe_backup_2025-07-13_10-39-24.txt (add you actual file name).

🤝 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.


📝 License

Distributed under the MIT License.


If PyWipe helped streamline your workflow, consider giving us a ⭐!

Metadata

Release files for pywipe 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pywipe 1.1.0
File Size Uploaded Provenance
pywipe-1.1.0.tar.gz 7.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pywipe 1.1.0
File Interpreter ABI Platform
pywipe-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.6 kB

Release files / pywipe-1.1.0.tar.gz

Download URL pywipe-1.1.0.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e6447e730c1bd129d0ef28a2c03fcefb152fd167a894239d78083da911f36728
BLAKE2b-256 checksum
How to use checksums
7def497d543c1ae78c909a3b54d991d8cd0fbd5be3d56512cdbc34cfb8c4eb76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.4

Release files / pywipe-1.1.0-py3-none-any.whl

Download URL pywipe-1.1.0-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f8dc09b92fcb6d362852f914b5ed2f815042a8655854337af12951777bbc58ad
BLAKE2b-256 checksum
How to use checksums
58adc3ab66370830792fba5c5618c3e92e06f198174b39f1e1419630b06cb46f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.4

Security for pywipe 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page