Ultimate Guide to Scoop for Windows

Development
Ultimate Guide to Scoop for Windows

1. What is Scoop and Why Use It?

Scoop is a command-line package manager for Windows. Unlike traditional installers (or tools like winget and chocolatey), Scoop installs applications directly into your user directory (C:\Users\your_username\scoop).

Key Benefits:

  • Keeps the Windows Registry clean.
  • Prevents cluttering global environment variables.
  • Ideal for development environments (enables switching Java, Node, Go, or other tool versions seamlessly).
  • Does not require Administrator privileges for the vast majority of packages.

2. Installing Scoop

By default, Scoop requires installation from a non-elevated user terminal (to preserve permission isolation).

Standard Method (Recommended)

  1. Open PowerShell in normal user mode (do NOT select "Run as administrator").
  2. Allow local script execution for the current session:
    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
    
  3. Download and run the Scoop installer:
    irm get.scoop.sh | iex
    

3. Troubleshooting: "What if my terminal always opens as Administrator?"

Sometimes Windows Terminal or account settings force PowerShell to always open elevated (Administrator: Windows PowerShell). Running the standard command in an elevated prompt triggers the error:

Running the installer as administrator is disabled by default... Abort.

If you cannot open PowerShell as a standard user, use one of the two solutions below:

Option A: Pass the Admin Flag to the Installer

Instruct the installer script to accept elevated privileges:

irm get.scoop.sh -Arguments '-RunAsAdmin' | iex

Option B: Manual Installation (Bypass)

If the automated installer still aborts, download the repository directly and set up environment variables manually by executing this script block in PowerShell:

# 1. Create the user directory
New-Item -Type Directory -Force -Path "$env:USERPROFILE\scoop"

# 2. Configure the Scoop environment variable
[Environment]::SetEnvironmentVariable('SCOOP', "$env:USERPROFILE\scoop", 'User')
$env:SCOOP = "$env:USERPROFILE\scoop"

# 3. Download and extract Scoop directly from GitHub
Invoke-WebRequest -Uri "https://github.com/ScoopInstaller/Scoop/archive/master.zip" -OutFile "$env:TEMP\scoop.zip"
Expand-Archive -Path "$env:TEMP\scoop.zip" -DestinationPath "$env:TEMP\scoop_old" -Force
Move-Item -Path "$env:TEMP\scoop_old\Scoop-master\*" -Destination "$env:USERPROFILE\scoop" -Force

# 4. Add Scoop binaries to the user's PATH
$oldPath = [Environment]::GetEnvironmentVariable('Path', 'User')
if ($oldPath -notlike "*scoop*") {
    [Environment]::SetEnvironmentVariable('Path', "$oldPath;$env:USERPROFILE\scoop\bin", 'User')
}
$env:Path += ";$env:USERPROFILE\scoop\bin"

# 5. Initialize Scoop
scoop update

Verify the installation by running:

scoop --version

4. Managing Buckets (Extra Repositories)

Scoop organizes software manifests into repositories called buckets. The main bucket is enabled by default. To access development tools and common desktop software, add the community buckets:

# Add the extras bucket for general applications and utilities
scoop bucket add extras

# Add the java bucket for Java Development Kits (JDKs)
scoop bucket add java

5. Installing and Managing JDKs (Java Development Kits)

With the java bucket enabled, you can search for and install various Java distributions (Oracle, OpenJDK, Temurin, Corretto, Zulu, etc.).

Search for Available OpenJDK Packages:

scoop search openjdk

Install a Specific JDK Version:

scoop install openjdk21

Switch Active Java Version (reset):

If you have multiple JDK versions installed (e.g., JDK 17 and JDK 21), switch the default system version using the reset command:

# Switch active system version to OpenJDK 21
scoop reset openjdk21

(This command updates JAVA_HOME and refreshes user environment symlinks automatically).


6. Essential Daily Commands

Action Command
Search for a package scoop search <name>
Install a package scoop install <name>
List installed packages scoop list
Update Scoop index scoop update
Update a specific app scoop update <name>
Update ALL installed apps scoop update *
Uninstall an app scoop cleanup * (removes old versions) / scoop uninstall <name>

Comments