xcpretty / xcode-install

🔽 Install and update your Xcodes
https://fastlane.tools
MIT License
2.59k stars 243 forks source link

Cannot uninstall Xcode 12 beta, Xcode 13 beta, ... #414

Open pronebird opened 4 years ago

pronebird commented 4 years ago

xcversion is not able to detect different beta versions of Xcode 12:

$ xcversion installed     
12.0.1  (/Applications/Xcode-12.0.1.app)    
12.2    (/Applications/Xcode-12.2.beta.3.app)   
12.2    (/Applications/Xcode-12.2.beta.2.app)   

$ xcversion uninstall '/Applications/Xcode-12.2.beta.2.app'
[!] Version /Applications/Xcode-12.2.beta.2.app is not installed.

$ xcversion uninstall '12.2 beta 2'
[!] Version 12.2 beta 2 is not installed.

$ xcversion --version
2.6.6
nuomi1 commented 3 years ago
➜  Downloads xcversion installed
11.7    (/Applications/Xcode-11.7.app)
12.5.1  (/Applications/Xcode.app)
13.0    (/Applications/Xcode-13.beta.2.app)
13.0    (/Applications/Xcode-13.beta.app)
➜  Downloads xcversion uninstall '13.0'
➜  Downloads xcversion installed
11.7    (/Applications/Xcode-11.7.app)
12.5.1  (/Applications/Xcode.app)
13.0    (/Applications/Xcode-13.beta.app)
➜  Downloads xcversion uninstall '13.0'
➜  Downloads xcversion installed
11.7    (/Applications/Xcode-11.7.app)
12.5.1  (/Applications/Xcode.app)

xcversion only uninstalls the first one.

pronebird commented 3 years ago

Still broken..

$ xcversion list  

[..redacted..]
13 beta (installed)
13 beta 2 (installed)

$ xcversion uninstall '13 beta'
[!] Version 13 beta is not installed.

$ xcversion --version
2.6.8
SpacyRicochet commented 3 years ago

I can confirm this is still an issue on version 2.7.0.

❯ xcversion list
...
12.5.1
13 beta (installed)
13 beta 2 (installed)
13 beta 3
13 beta 4

~ took 20s
❯ xcversion uninstall '13 beta'
[!] Version 13 beta is not installed.

~ took 9s
❯ xcversion --version
2.7.0
pronebird commented 3 years ago

Suddenly not able to uninstall '13 beta 5' with xcode-install 2.6.8 and 2.8.0:

% xcversion list
...
13 beta
13 beta 2
13 beta 3
13 beta 4
13 beta 5 (installed)
13

% xcversion uninstall '13 beta 5'
[!] Version 13 beta 5 is not installed.
rogerluan commented 3 years ago

Beta versions are not installable anymore AFAIK (after Xcode public version was released). run xcversion update and check if it's still "visible"

pronebird commented 3 years ago

@rogerluan I am uninstalling the Xcode beta. Beta versions are still displayed after running xcversion update and subsequent xcversion list

rogerluan commented 3 years ago

Oooh 😮 gotcha, I misunderstood the issue, sorry.

niil-qb commented 2 years ago

I found out that it still is possible to uninstall by skipping the beta part.

So xcversion unintall "14 beta 3" becomes xcversion uninstall "14.0". This is because that's the Xcode version internally. It's probably possible to fix but it will be a bigger change to how xcode-install handles versions internally.