Skip to content

"winget uninstall -e Python.Python.3.9" uninstalled Python 3.10 #2938

Open

Description

@kman3107

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

Activity

  1. added
    Issue-Bug
    and removed
    Needs-Triage
    on Feb 8, 2023
  2. stephengillie commented on Feb 8, 2023

    @stephengillie

    Hi Kim (@kman3107),

    Can you upload the logs from when this occurred? If feasible, can you re-run the uninstall with --verbose-logs flag? These logs should help us to better understand why this happened.

  3. kman3107 commented on Feb 8, 2023

    @kman3107
    Author

    Hello Stephen Gillie (@stephengillie),

    Because I already had both versions (3.9 and 3.10) installed now, I ran the command twice.
    This is the terminal:

    PowerShell 7.3.2
    PS C:\Users\Kim> winget uninstall -e Python.Python.3.9 --verbose-logs
    Found Python 3 [Python.Python.3.9]
    Starting package uninstall...
    Successfully uninstalled
    PS C:\Users\Kim> winget uninstall -e Python.Python.3.9 --verbose-logs
    Found Python 3 [Python.Python.3.9]
    Starting package uninstall...
    Successfully uninstalled

    The logs for both instances are attached.

    WinGet-2023-02-08-18-30-30.214.log
    WinGet-2023-02-08-18-32-26.439.log

    The log from the first time I accidentally uninstalled python 3.10 using the 3.9 name:

    WinGet-2023-02-08-16-34-32.081.log

  4. added
    Area-Matching
    on Feb 21, 2023
  5. modified the milestones: v1.5-Client, on Jun 6, 2023
  6. removed this from the milestone on Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-MatchingIssue-Bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions