Force reinstall of all chocolatey packages after profile "migration"

6,022

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.

Share:
6,022

Related videos on Youtube

einpoklum
Author by

einpoklum

Made my way from the Olympus of Complexity Theory, Probabilistic Combinatorics and Property Testing to the down-to-earth domain of Heterogeneous and GPU Computing, and now I'm hoping to bring the gospel of GPU and massive-regularized parallelism to DBMS architectures. I've post-doc'ed at the DB architecture group in CWI Amsterdam to do (some of) that. I subscribe to most of Michael Richter's critique of StackOverflow; you might want to take the time to read it. If you listen closely you can hear me muttering "Why am I not socratic again already?"

Updated on September 18, 2022

Comments

  • einpoklum
    einpoklum almost 2 years

    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?

    • Ramhound
      Ramhound over 4 years
      @vssher - You should submit a detailed answer instead of submitting a temporary comment.
    • einpoklum
      einpoklum over 4 years
      @vssher: That doesn't reinstall anything.