Windows Installer Not Uninstalling?

The windows installer still leaves everything that was previously installed in C:\Library, even in the recent 5.5 installer. To get a clean install, it looks like I have to clean out that directory myself before reinstalling.

The installer doesn't support upgrades yet, so, yes, you would have to run the uninstall process before installing the new version.

Is it expected that after uninstalling that the contents of C:\Library\ remain intact?

No, they should be removed, unless you modified the contents. This sounds like a regression :frowning:

EDIT: trying out an install/uninstall cycle of 5.5, it seems that the contents are removed properly.

I did install 5.5 over 5.4.3 once. Perhaps that left things in an inconsistent state? What's the right way to get back to a pristine uninstalled state? I'm running on Windows 11 beta insider builds, if that matters.

AFAIK you can find the old Swift 5.4.3 (versioned with 0.0.0.0) in Software Management even if part of its files were overwritten. Check if there’s any “Swift”, and uninstall all of them.

@compnerd Maybe we should keep Swift up to date in winget to provide a consistent experience of upgrading Swift? Is it required that you open the PR in person?

1 Like

@stevapple yes, keeping winget updated is the intent. I did however happen to forget to update after the 5.4.3 release :cry:. I’ll try to get that resolved. 5.5 should be available now though.

As to the versioning - that’s a problem that I don’t have a good solution to yet. Part of it is that I would like to be able to automate that so the number doesn’t need to be changed manually (which would prevent nightly snapshots).

If we use winget, will it be sufficient to use "winget upgrade swift" whenever there's a new build? It does first run an uninstall, and then does an install. But will that correctly update all of the bits?

I believe that it should. If you update Visual Studio, you may have to repair the install (via the usual “Add/Remove Programs” dialog). I would love to see the upgrade support for the normal install to be sorted out, but the resources packaging prevents that currently.

Ah, yes, when I removed the 0.0.0.0 version from my system, the contents of C:\Library vanished.

Terms of Service

Privacy Policy

Cookie Policy