winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

uninstall does not work for - JetBrains.PyCharm.Community

Open marcusfz opened this issue 3 years ago • 9 comments

Not sure if it is an issue with PyCharm basically copying files to a location and unable to overwrite for upgrades. Currently have three versions of PyCharm installed

winget list ... PyCharm Community Edition 2021.3.3 JetBrains.PyCharm.Community 213.7172.26 221.5787.24 PyCharm Community Edition 2022.1 JetBrains.PyCharm.Community 221.5080.212 221.5787.24 PyCharm Community Edition 2022.1.2 JetBrains.PyCharm.Community 221.5787.24 ...

attempt to run

winget uninstall --name 'PyCharm Community Edition'

Winget tells me no associated packages are installed.

marcusfz avatar Jun 20 '22 15:06 marcusfz

You likely need to include the version since it is part of the "Name". For example:

winget uninstall "PyCharm Community Edition 2021.3.3"

I'm guessing since there are three packages with the "packageIdentifier" "JetBrains.PyCharm.Community" the Windows Package Manager is likely not to be able to disambiguate.

denelon avatar Jun 20 '22 16:06 denelon

@marcusfz this issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

ghost avatar Jun 28 '22 16:06 ghost

This issue was not resolved

winget list gives me these versions of Pycharm

winget list
Name                                    Id                                      Version             Available    Source
-----------------------------------------------------------------------------------------------------------------------
PyCharm Community Edition 2021.3.3      JetBrains.PyCharm.Community             213.7172.26         221.5921.27  winget
PyCharm Community Edition 2022.1        JetBrains.PyCharm.Community             221.5080.212        221.5921.27  winget
PyCharm Community Edition 2022.1.2      JetBrains.PyCharm.Community             221.5787.24         221.5921.27  winget
PyCharm Community Edition 2022.1.3      JetBrains.PyCharm.Community             221.5921.27                              winget

When I go to uninstall any of them I get the following

❯ winget list --query "pycharm"
Name                               Id                          Version      Available   Source
----------------------------------------------------------------------------------------------
PyCharm Community Edition 2021.3.3 JetBrains.PyCharm.Community 213.7172.26  221.5921.27 winget
PyCharm Community Edition 2022.1   JetBrains.PyCharm.Community 221.5080.212 221.5921.27 winget
PyCharm Community Edition 2022.1.2 JetBrains.PyCharm.Community 221.5787.24  221.5921.27 winget
~
❯ winget uninstall --id JetBrains.PyCharm.Community --version 213.7172.26
No installed package found matching input criteria.
~
❯ winget uninstall --id JetBrains.PyCharm.Community --version 213.5080.212
No installed package found matching input criteria.
~
❯ winget uninstall --name 'PyCharm Community Edition 2021.3.3'
Found PyCharm Community Edition [JetBrains.PyCharm.Community]
Starting package uninstall...
An unexpected error occurred while executing the command:
0x800401f5 : Application not found
~

marcusfz avatar Jun 29 '22 15:06 marcusfz

Dug a little further seems to have worked for the exact name but in the Folder where Pycharm is installed seems each version creates a new folder and at some point the installs start failing.

Uninstalls figured out how to make it work, though seems wonky

Needed to copy one - basically any of the versions make sure the folder was named the same as the version winget thinks is installed then ran

❯ winget list --query "pycharm"
Name                               Id                          Version     Available   Source
---------------------------------------------------------------------------------------------
PyCharm Community Edition 2021.3.3 JetBrains.PyCharm.Community 213.7172.26 221.5921.27 winget
PyCharm Community Edition 2022.1.2 JetBrains.PyCharm.Community 221.5787.24 221.5921.27 winget
~
❯ winget uninstall --name 'PyCharm Community Edition 2022.1.2'
Found PyCharm Community Edition [JetBrains.PyCharm.Community]
Starting package uninstall...
Successfully uninstalled
~
❯ winget uninstall --name 'PyCharm Community Edition 2021.3.3'
Found PyCharm Community Edition [JetBrains.PyCharm.Community]
Starting package uninstall...
Successfully uninstalled
~

marcusfz avatar Jun 29 '22 16:06 marcusfz

This does seem a bit strange. I think it may be another edge case we need to look at, or potentially an ask for JetBrains to improve install and / or uninstall scenarios.

denelon avatar Jun 29 '22 18:06 denelon

Once it is installed I get errors on update cannot install in a non-empty folder

marcusfz avatar Jun 29 '22 18:06 marcusfz

try doing it via uninstall page on control panel

roblox34 avatar Sep 10 '22 14:09 roblox34

That is not the issue

I can uninstall with the uninstaller

The fail is when I was using winget

The folder that contains the software does not clean out and there is probably a isnotempty boolean of some sort and the folder is not empty so winget is assuming the app is there

Marcus Fernandez

principal Software Engineer

Office: +1 (703) 6571918tel:+1%20(703)%206571918

@.@.>

9 AM - 6 PM Easternoutlook-data-detector://1 Standardoutlook-data-detector://1 timeoutlook-data-detector://1

If you have any feedback about my work, please let either me or my manager s Richard Justice @.@.>m

Azure Data Bloghttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Fproduct-categories%2Fdatabases%2F&data=02%7C01%7CMarcus.Fernandez%40microsoft.com%7C5b0d71cc96e744d3a78a08d811780bc1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637278554578182899&sdata=IclY%2BFBuWxReEPy%2BeTZpW3WmdD9WZuXmm4RyElE3Rtc%3D&reserved=0 |Azure Gov Bloghttps://aka.ms/azuregovblog | @.***https://aka.ms/devops

marcusfz avatar Oct 11 '22 08:10 marcusfz

WinGet is looking at registry entries to see what is installed. If the uninstaller isn't removing those entries, the Windows Package Manager has no other way to determine the package isn't installed.

denelon avatar Oct 11 '22 17:10 denelon