3

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
  • A quick sidenote that sometimes choco installs stuff to its own location, so some wrangling might be needed on that end too
    – Journeyman Geek
    Commented Apr 10, 2022 at 0:57
  • Whereas Scoop almost always does, @JourneymanGeek. To my dismay, Scoop developers seem to think that's a good thing. Commented Apr 11, 2022 at 2:50

1 Answer 1

3

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 $_}
1
  • 2
    I'm curious why you're forcing scoop to install things globally, which requires Admin permissions. Isn't that kind of going against the scoop ethos to keep it simple and keep things in user-space? Is your philosophy here only applicable in the specific case of trying to migrate from chocolatey to scoop without uninstalling and reinstalling everything? Or does your method result in having 2 installs of everything when you complete your recommended process? You don't mention using chocolatey at the end to uninstall the chocolatey-installed packages. Commented Sep 22, 2022 at 16:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .