Force reinstall of all chocolatey packages after profile "migration"

For various reasons, my Windows user profile has been recreated; and - AppData files have been copied into the new profile, but not registry contents.

Now, I'm trying to restore the installation state of my chocolatey-installed apps. The thing is, when I try to choco install foo, I get a message saying:

foo v1.2.3 already installed. Use --force to reinstall, specify a version to install, or try upgrade.

How can I force a reinstall of all installed apps?

2

1 Answer

It seems this should work:

choco upgrade all --force

... and remember to execute this in a Powershell opened with "Run As Administrator".

Edit: If any of the installations fail (which occasionally happens ), I don't know how to continue with just the remaining re-installations rather than all of it together. So, more robust solutions would be very welcome.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like