How to migrate from Chocolatey to Scoop?

I'm finding that Scoop's repos are more often updated than Chocolatey's (am I wrong?).

Scoop doesn't immediately recognise apps already installed, so I wanted a way to let Scoop know the apps I had already installed with Chocolatey.

2

1 Answer

First, install Scoop globally (I like instructing it to install apps in Window's default apps folder, ProgramData, rather than under the User folder):

iwr -useb get.scoop.sh -outfile 'install.ps1'
.\install.ps1 -ScoopDir 'C:\ProgramData\Scoop' -ScoopGlobalDir 'C:\ProgramData'

If you already have Scoop installed (as I, and likely you, did), do not fret; follow the instructions above (renaming the existing Scoop folder to something else, say Scoop0, if it's already installed under ProgramData), then move--MOVE! NOT copy, which takes far longer--the files and subfolders from the old folder to the new one, making sure--and this is VERY IMPORTANT--to SKIP the files already in the target folder (so you don't mangle the new installation).

If for any reason the installed apps don't work, scoop list | %{scoop reset ($_.Name)} will fix them all rebuilding their shims and shortcuts.

This is all standard; here comes the secret sauce:

choco list -l | select -skip 1 | %{$_.split().split('.')[0]} | select -skiplast 1 -unique | %{scoop install -g $_}

This will list all apps installed by Chocolatey, and feed into Scoop to have it installed globally.

Chocolatey also lists installed apps it didn't install on your system. You may feed them to Scoop too via:

choco list -li | select -skiplast 1 | sls -pattern '^([-\w\s]*)\|' | %{$_.matches.groups[1].value -replace " ",""} | %{scoop install -g $_}

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