microsoft / microsoft/winget-cli
"winget uninstall -e Python.Python.3.9" uninstalled Python 3.10
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
I only had 1 python version installed, and it was python 3.10.
I tried to install python 3.9 using "winget install -e Python.Python.3.9" and I got "Found an existing package already installed. Trying to upgrade the installed package..."
When I decided to run "winget uninstall -e Python.Python.3.9" in case I once had a 3.9 installed and there was some registry issues, it uninstalled the 3.10 version.
Steps to reproduce
- Install Python 3.10 (have no other python version on computer)
- Uninstall Python 3.9
- Python 3.10 is uninstalled
Expected behavior
- Running "winget install -e Python.Python.3.9" should install Python 3.9 if its specific version does not exist on computer
- Running "winget uninstall -e Python.Python.3.9" should NOT uninstall Python.Python.3.10
Actual behavior
PS C:\Users\Kim> winget install -e Python.Python.3.9
Found an existing package already installed. Trying to upgrade the installed package...
No applicable upgrade found.
PS C:\Users\Kim> winget uninstall -e Python.Python.3.9
Found Python 3 [Python.Python.3.9]
Starting package uninstall...
Successfully uninstalled
I only had Python 3.10 installed on the computer before the above actions were taken.
Environment
Windows Package Manager v1.4.10173
Windows: Windows.Desktop v10.0.19044.2486
Package: Microsoft.DesktopAppInstaller v1.19.10173.0
PowerShell: PowerShell 7.3.2
Python: Python3.10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported install and uninstall commands in the listed WinGet, Windows, PowerShell, and Python 3.10 environment, then trace how the CLI resolves the requested package identifier. Done means an exact request for Python.Python.3.9 does not match or uninstall Python.Python.3.10, while the reported install and uninstall behavior is covered by regression tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, python
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100