How to Completely Remove Python from a Windows Machine
Removing Python from Windows is rarely a one-click job. The uninstaller only takes care of the interpreter itself, while caches, PATH entries, Start menu shortcuts, registry records, and command aliases can survive and quietly break the next install. Add in the fact that Python now ships through two very different installers — the classic full installer and the newer Python install manager — and "just uninstall it" turns into a real cleanup project.
This guide explains how to completely remove Python from a Windows machine, whichever way it was installed, and how to confirm nothing meaningful is left behind. Follow it in order and you will end with a clean slate for a reinstall, a troubleshooting experiment, or a machine you are handing over to someone else.
Table of Contents#
- Why a Full Python Removal Matters
- Step 0: Inventory What Is Installed and Back Up Your Work
- Know Your Install Method Before Deleting Anything
- Remove Python Installed with the Python Install Manager
- Remove Python Installed with the Classic Full Installer
- Remove Microsoft Store Python and the Old py.exe Launcher
- Delete Leftover Files and Folders
- Clean Up Environment Variables and PATH
- Clean Up Registry Entries Safely
- Remove Anaconda or Miniconda Properly
- Verify Python Is Completely Gone
- Troubleshooting Common Problems
- Best Practices and Common Mistakes
- Conclusion
- References
Why a Full Python Removal Matters#
A half-removed Python is worse than no removal at all. Common symptoms of leftovers include:
- A reinstall that picks up a stale
pip, an old Scripts directory, or a broken PATH order. pylaunching a version you thought you deleted, because the old launcher still outranks everything else.- IDEs such as VS Code or PyCharm still discovering phantom interpreters from registry entries.
- Mysterious
pythonorpython3stubs that open the Microsoft Store instead of running code. - Disk space that never comes back because wheel caches and per-user installs were never touched.
People usually remove Python for one of these reasons: a corrupted install that repair cannot fix, conflicts between several versions, freeing gigabytes of package caches, preparing a clean reinstall, or migrating from the classic installer to the Python install manager that the CPython team now recommends.
Step 0: Inventory What Is Installed and Back Up Your Work#
Do not start deleting folders yet. First, record what exists so you can target every copy of Python and avoid destroying something you need.
List every Python you have#
Open a terminal (Command Prompt or PowerShell) and run:
py list
py list --only-managed
where python
where py
python --versionpy listshows everything the Python install manager (or old launcher) can see, including runtimes it does not manage.py list --only-managednarrows the list to runtimes the install manager installed and can therefore update or uninstall for you.where pythonandwhere pyreveal every executable on PATH, which often exposes multiple side-by-side installs.
Also check Windows itself: open Settings > Apps > Installed apps and search for Python. Typical entries include Python 3.13.x, Python Launcher, Python Install Manager, and older Python 3.x apps from the Microsoft Store. If you use WinGet, winget list --name python shows what it installed.
Back up anything you cannot recreate#
- Copy scripts, notebooks, and project folders somewhere safe.
- Export dependency lists for virtual environments you want to keep:
pip freeze > requirements.txt. - For conda, export environments before touching anything:
conda env export --name myenv > myenv.yaml. - If you rely on global site-packages, remember that a clean removal deletes them with the interpreter.
Note that virtual environments usually die with their base interpreter. Recreating a venv from requirements.txt is faster than trying to preserve it.
Do not remove Pythons that belong to other applications#
Many desktop apps bundle or embed their own Python: Blender, ArcGIS Pro, Inkscape, GIMP, LibreOffice, and various CAD and GIS tools. Their copies live inside the application's own folder and are not managed by python.org installers. Deleting them breaks the app. Only remove Python that you installed through an official installer, the Microsoft Store, WinGet, or a conda distribution.
Close everything that might hold Python open#
Exit IDLE, VS Code, PyCharm, Jupyter, terminals running scripts, and any background services (Django, Flask, Celery, and similar). In Task Manager, end any lingering python.exe, pythonw.exe, or py.exe processes. Open files are the number-one cause of "access denied" errors during cleanup.
Know Your Install Method Before Deleting Anything#
Windows can end up with Python from several sources, and each is removed differently.
| Install source | How to recognize it | Removal route |
|---|---|---|
| Python install manager (recommended since Python 3.14) | python, py, and pymanager commands; runtimes managed via py install / py uninstall | py uninstall --purge, then remove the manager app |
| Classic full installer (deprecated since 3.14, not produced for 3.16 or later) | Python X.Y.Z entries in Programs and Features; per-user or Program Files folders | Settings/Control Panel uninstall or the installer's /uninstall switch |
Microsoft Store Python 3.x app (older Store releases) | A Store app entry named Python 3.x | Settings > Apps > Uninstall |
| Anaconda / Miniconda | anaconda3 or miniconda3 folder, Anaconda Prompt | Distribution uninstaller plus config cleanup |
| NuGet package or embeddable zip | A plain folder inside a project or app directory | Delete the folder (nothing is registered) |
A single machine can have several of these at once — for example, a full-installer Python 3.11 plus the install manager plus an old Store stub. Check each category before you call the cleanup finished.
Remove Python Installed with the Python Install Manager#
The Python install manager is the modern way to run Python on Windows. It installs from the Microsoft Store, from python.org as an MSIX, or via WinGet (winget install 9NQ7512CXL7T), and it manages runtimes with the py command. Because it is an MSIX/Store-style app plus per-user runtimes, its cleanup is different from the classic installer.
1. Remove the managed runtimes first#
This order matters. Uninstalling the manager app alone does not remove any Python runtimes — they stay on disk and keep working, minus the python and py commands.
py list --only-managed
py uninstall 3.14 # remove one version (add -y to skip prompts)
py uninstall --purge # remove ALL managed runtimes and clean up after thempy uninstall --purge is the complete-cleanup command: it removes every runtime the manager installed and also clears the Start menu shortcuts, registry registrations, and download caches it created. Runtimes you installed some other way are left untouched, as are configuration files you wrote yourself.
If you already removed the manager before purging, reinstall it temporarily and run py uninstall --purge again — the official design expects this recovery path.
2. Remove the Python install manager itself#
With the runtimes gone, remove the manager:
-
Settings (recommended): Settings > Apps > Installed apps > search
Python Install Manager> Uninstall. -
PowerShell (MSIX): documented package name is
PythonSoftwareFoundation.PythonManager:Get-AppxPackage PythonSoftwareFoundation.PythonManager | Remove-AppxPackage -
WinGet: if you installed it with
winget install 9NQ7512CXL7T, remove that package withwinget uninstall 9NQ7512CXL7T.
If you deployed the MSI variant to Program Files for machines that cannot take MSIX packages, remove it like any other installed program from Settings or Control Panel.
3. Remove manager leftovers#
After a purge and an app removal, delete these if they are still present:
%LocalAppData%\Python— runtime installs and thebinfolder of global command aliases.%AppData%\Python\pymanager.json— the user configuration file (this one lives under Roaming, not Local).- PATH entries pointing at
%LocalAppData%\Python\binor any per-runtimeScriptsdirectory.
Remove Python Installed with the Classic Full Installer#
Older setups — and any version up to 3.15 — may use the traditional executable installer from python.org. That installer has been deprecated since Python 3.14 and will not be produced for Python 3.16 or later, but millions of machines still have its installs, so its cleanup steps remain essential.
Interactive uninstall#
- Open Settings > Apps > Installed apps (or Control Panel > Programs and Features via
appwiz.cpl). - Find each
Python X.Y.Zentry — repeat for every version, newest first or oldest first, it does not matter as long as none are skipped. - Choose Uninstall/Change to open the installer in maintenance mode, then click Uninstall.
Maintenance mode also offers Modify (add or remove features) and Repair (re-verify installed files). The uninstall removes that Python version entirely. In recent releases it does not remove the Python install manager, which has its own separate entry in Installed apps.
Silent uninstall for scripts and IT deployments#
The full installer accepts command-line switches, which is handy when you manage many machines:
python-3.14.0.exe /quiet /uninstall/uninstall removes the product without a confirmation prompt and /quiet suppresses all UI. Add /log C:\temp\py-uninstall.log if you need a log of what happened.
Remove the classic launcher entry#
The full installer usually also installed Python Launcher for Windows (py.exe). Remove that entry from Installed apps as well if you are wiping Python entirely. If you do not, py may keep resolving to the old launcher.
Remove Microsoft Store Python and the Old py.exe Launcher#
Older Microsoft Store Python apps#
Before the install manager, Python was published to the Microsoft Store as Python 3.x apps. Those are removed like any Store app: Settings > Apps > Installed apps > find Python 3.x > Uninstall. PowerShell can also remove the app package if Settings fails:
Get-AppxPackage *Python* | Select Name, PackageFullName
Get-AppxPackage <PackageFullName> | Remove-AppxPackageThe legacy py.exe launcher versus the new manager#
Both the old launcher and the new install manager own the py command. The official troubleshooting guidance when the wrong one wins is simple: open Installed apps, search for Python launcher, and uninstall the legacy one. If you want to keep the old launcher instead, use pymanager for install-manager commands instead of py.
Clean up app execution aliases#
Windows ships app execution aliases that can shadow or fake python and python3. Open Settings > Apps > Advanced app settings > App execution aliases and review the list. Typical leftovers after an uninstall are python.exe, python3.exe, Python (default), Python (default windowed), and Python install manager. Disable or remove aliases that point at apps you just uninstalled; if a Store-era stub prints "Python was not found; run without arguments to install from the Microsoft Store", these aliases are exactly why.
Delete Leftover Files and Folders#
Uninstallers miss things. Browse to each of these locations (press Win + R and paste the path) and delete what remains. Replace <User> with your Windows account name.
| Location | What lives there |
|---|---|
C:\Users\<User>\AppData\Local\Programs\Python | Per-user full-installer versions (Python311, Python313, ...) |
C:\Program Files\PythonXX | All-users full-installer versions |
C:\Program Files (x86)\PythonXX | 32-bit installs on 64-bit Windows |
C:\PythonXX | Very old installs placed at the drive root |
C:\Users\<User>\AppData\Local\Python | Install-manager runtimes and the bin alias folder |
C:\Users\<User>\AppData\Roaming\Python | Install-manager user config (pymanager.json) and per-user add-ons |
C:\Users\<User>\AppData\Local\pip | pip's HTTP and wheel caches |
<env>\ project folders | venv or virtualenv directories you created |
Clear the pip cache on purpose#
pip caches downloaded wheels under %LocalAppData%\pip\Cache and can hold hundreds of megabytes per project. Ask pip where it is, then purge it before the interpreter disappears:
pip cache dir
pip cache purgeIf Python is already gone, just delete the %LocalAppData%\pip folder — it contains only cache data.
Virtual environments#
Delete any venv, .venv, or env folders you no longer need. They are not usable after the base interpreter is removed, and they often contain the bulk of the disk usage people are trying to reclaim.
Clean Up Environment Variables and PATH#
PATH is the most common source of post-uninstall weirdness. A leftover entry can make where python succeed against a directory that barely exists, or make a new install lose priority to a dead one.
- Press
Win + R, runsysdm.cpl, open the Advanced tab, click Environment Variables. (Or search Start for "Edit environment variables for your account".) - Inspect both User variables and System variables.
- Edit
Pathin each and delete entries that point at removed Python folders, for example:C:\Users\<User>\AppData\Local\Programs\Python\Python313\C:\Users\<User>\AppData\Local\Programs\Python\Python313\Scripts\C:\Program Files\Python313\and itsScriptssubfolderC:\Users\<User>\AppData\Local\Python\bin<runtime>\Scriptsfolders added by the install manager
- Also check for
PYTHONHOMEandPYTHONPATHin either list. Delete them unless another tool needs them — they force every Python launch to look in a specific location. - Open a new terminal (old ones keep stale PATH values) and run
where pythonagain. Reboot if anything still resolves to a deleted folder.
Clean Up Registry Entries Safely#
The Windows Registry records Python installs so that IDEs, the launcher, and other tools can find them. Leftover keys are mostly cosmetic, but they cause "ghost" interpreters in IDEs. Editing the registry is an advanced step — skip it if a clean reinstall is all you need.
Back up before you edit#
Open regedit, choose File > Export, select All, and save the backup somewhere safe.
Where Python records live#
Python installations register themselves under a standard layout (documented in PEP 514):
HKEY_CURRENT_USER\Software\Python\<Company>\<Tag>
HKEY_LOCAL_MACHINE\Software\Python\<Company>\<Tag>
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Python\<Company>\<Tag>Official python.org installs use the company name PythonCore with a version tag such as 3.13-64. Third-party distributions register under their own company names, so delete only the subkeys for tools you removed. If Software\Python contains nothing but leftovers from the tools you just uninstalled, remove the whole Python key.
What not to delete#
- Do not hand-delete keys under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData. Those belong to Windows Installer's own internal database, and removing them by hand can damage unrelated installed products. Classic python.org installs are Windows Installer (MSI) based, which is why this area can collect clutter around Python — the safe response is to re-run the official uninstaller (or an installer with/uninstall) rather than editing these keys. - Leave
Uninstallentries that do not mention Python; those belong to other apps. - If a key refuses to die, right-click it > Permissions > Advanced > take ownership, grant yourself Full control, and delete.
Remove Anaconda or Miniconda Properly#
Anaconda and Miniconda are Python distributions with their own uninstaller, environments, and config files. Deleting just the anaconda3 folder leaves registry entries, PATH changes, and .condarc files behind.
-
Export environments you want to keep:
conda env export --name myenv > myenv.yaml. -
Delete environments that live outside the install directory first, and remove any environment that used the
conda-pypichannel — their cleanup is handled differently. -
Uninstall via Control Panel > Uninstall a program > Anaconda (or Miniconda), or run
Uninstall-Anaconda3.exe/Uninstall-Miniconda3.exefrom the install folder. -
For a thorough cleanup (supported since the 2025.06 release), run the silent uninstaller with removal switches:
Start-Process -FilePath ".\anaconda3\Uninstall-Anaconda3.exe" ` -ArgumentList "/S /RemoveCaches=1 /RemoveConfigFiles=user /RemoveUserData=1" -Wait/RemoveCaches=1clears package and index caches,/RemoveConfigFiles=user|system|allremoves.condarcfiles, and/RemoveUserData=1removes%USERPROFILE%\.conda. -
Delete leftovers the uninstaller admits it leaves behind: desktop shortcuts and any remaining Start menu folders.
-
Optionally run
anaconda-clean(from theanaconda-cleanpackage) if you installed it — it removes config traces that survive the main uninstall.
Verify Python Is Completely Gone#
Work through this checklist in a new terminal:
python --version
py --version
where python
where py
py listExpected results:
pythonandpyrespond with "not recognized" (or launch nothing).where pythonandwhere pyreturn nothing.py listerrors out or shows no runtimes.
Then confirm outside the terminal:
- Settings > Apps > Installed apps — no
Python,Python Launcher, orPython Install Managerentries. - App execution aliases — no enabled
python.exe/python3.exestubs pointing at removed apps. - File system — a search for
python.exefinds nothing outside application folders you intentionally kept. - Environment variables — PATH contains no Python directories; no
PYTHONHOME/PYTHONPATH. - Registry (optional) —
regeditsearch forPythonCorefinds no keys for versions you removed. - PowerShell sanity check:
Get-Command python -Allshould return nothing.
Troubleshooting Common Problems#
"python is not recognized" — but where python still finds something#
PATH changes do not reach already-open terminals. Close every terminal, or reboot. If where python still prints a deleted path, you missed a PATH entry in both the user and the system variable lists.
Deleting folders fails with access denied#
Something still holds a file. Open Task Manager, end python.exe, pythonw.exe, py.exe, and related IDEs, then retry. Booting into Safe Mode is the sledgehammer option for stubborn cases.
py still launches an old version#
The classic launcher outranks the install manager, or a runtime you forgot is still registered. Check py list --only-managed, purge leftovers with py uninstall --purge, and uninstall the legacy Python Launcher entry from Installed apps.
Typing python opens the Microsoft Store#
That is the Store stub doing its job. Disable the python.exe and python3.exe app execution aliases (Settings > Apps > Advanced app settings > App execution aliases), or install the Python install manager if you actually want Python back.
The Python install manager will not uninstall#
If Settings stalls, remove the MSIX directly from an elevated PowerShell:
Get-AppxPackage PythonSoftwareFoundation.PythonManager | Remove-AppxPackageRemember this does not remove runtimes — reinstall the manager and run py uninstall --purge first if you skipped that step.
An application broke after the removal#
Blender, ArcGIS Pro, Inkscape, and similar apps expect their own Python. Reinstall that application (or its Python component) rather than putting python.org Python back.
Best Practices and Common Mistakes#
- Purge before you remove the manager.
py uninstall --purgemust run while the manager is still installed; the reverse order leaves runtimes behind. - Uninstall every version. Machines commonly hold 3.9, 3.11, and 3.13 side by side. Repeat the uninstall loop until Installed apps is clean.
- Do not hand-edit Windows Installer registry keys. Use the product's uninstaller; repair it first if it is broken.
- Back up the registry before touching it, and delete only keys you can identify.
- Skip Pythons bundled with other apps. Check the install path before deleting anything named
python.exe. - Restart terminals after PATH edits, or you will chase ghosts.
- When reinstalling, pick one system. The Python install manager is the recommended path going forward (the classic installer will not ship with Python 3.16+), so mixing legacy installers and the manager on one machine is how
pyconflicts start.
Conclusion#
To completely remove Python from a Windows machine, you have to clean up more than an entry in the Settings app. Inventory every install first, back up your projects, then remove runtimes through the right tool: py uninstall --purge for install-manager installs, the standard uninstaller (or /quiet /uninstall) for classic installs, and the distribution's own uninstaller for Anaconda or Miniconda. Afterwards, sweep leftover folders, pip caches, PATH entries, app execution aliases, and — if you care about IDE hygiene — registry keys under the Software\Python trees. Finish with the verification checklist, and your machine will be genuinely Python-free and ready for a clean reinstall.
References#
- Using Python on Windows — Python documentation
- PEP 773 – A Python Installation Manager for Windows
- PEP 514 – Python registration in the Windows registry
- Python install manager downloads — python.org
- Caching — pip documentation
- Uninstalling Anaconda Distribution — Anaconda documentation
- Uninstalling Miniconda — Anaconda documentation
- Uninstall or remove apps and programs in Windows — Microsoft Support