Install and Use Scoop on Windows

This guide intends to show you to Install and Use Scoop Package Manager on Windows.

Scoop is a command-line package manager for Windows which makes it easier to install and use common programs and tools. Scoop includes support for a wide variety of Windows software, as well as favorites from the Unix world. It addresses many of the common pain points with Windows’ software ecosystem, compared to the package manager models of Unix systems.

Steps To Install and Use Scoop on Windows

To complete this guide, you must log in to your Windows Client and follow the steps below.

Here we use Windows 10 with administrator privileges.

Install Scoop Windows Package Manager

First, you need to open your PowerShell as an administrator. Then, you need to run the command below in your PowerShell to set your execution policy to RemoteSigned

This will ensure you can run the PowerShell scripts you wrote or downloaded from the Internet.

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

Confirm the execution policy change, by pressing y.

At this point, you can download the scoop installer and install it by using the command below:

Invoke-Expression "& {$(Invoke-RestMethod get.scoop.sh)} -RunAsAdmin"
Output
Initializing...
Downloading ...
Extracting...
Creating shim...
Adding ~\scoop\shims to your path.
Scoop was installed successfully!
Type 'scoop help' for instructions.

You can verify your installation by using the command below to display a list of available commands for Scoop on Windows:

scoop -h
Output
Usage: scoop <command> [<args>]

Available commands are listed below.

Type 'scoop help <command>' to get more help for a specific command.

Command    Summary
-------    -------
alias      Manage scoop aliases
bucket     Manage Scoop buckets
cache      Show or clear the download cache
cat        Show content of specified manifest.
checkup    Check for potential problems
cleanup    Cleanup apps by removing old versions
config     Get or set configuration values
create     Create a custom app manifest
depends    List dependencies for an app, in the order they'll be installed
download   Download apps in the cache folder and verify hashes
export     Exports installed apps, buckets (and optionally configs) in JSON format
help       Show help for a command
hold       Hold an app to disable updates
home       Opens the app homepage
import     Imports apps, buckets and configs from a Scoopfile in JSON format
info       Display information about an app
install    Install apps
list       List installed apps
prefix     Returns the path to the specified app
reset      Reset an app to resolve conflicts
search     Search available apps
shim       Manipulate Scoop shims
status     Show status and check for new app versions
unhold     Unhold an app to enable updates
uninstall  Uninstall an app
update     Update apps, or Scoop itself
virustotal Look for app's hash or url on virustotal.com
which      Locate a shim/executable (similar to 'which' on Linux)

How To Use Scoop Package Manager

At this point, we want to show you the usage of Scoop on Windows to install, update, install multiple versions of a package, and switch between package versions.

Find and Install Packages with Scoop

Scoop lets you search packages available to install with the bucket command.

The bucket command lists all repositories (or buckets) containing Scoop packages. These buckets are like the package repositories used in Linux that contain a list of available packages and their dependencies.

To list the available buckets, run the command below:

scoop bucket list
Output
Name Source               Updated              Manifests
---- ------               -------              ---------
main ~\scoop\buckets\main 4/8/2023 11:30:20 AM      1185

The output below indicates that the main bucket contains 1185 packages you can install.

Each Scoop bucket has manifest files, which are updated periodically to add new packages and remove old ones. These files describe how to install a package and its dependencies.

To find a specific package, you can use the following syntax:

scoop search package-name

For example, search for the 7-zip:

scoop search 7zip
Output
Results from local buckets...

Name             Version Source Binaries
----             ------- ------ --------
7zip             22.01   main
7zip19.00-helper 19.00   main

For more information about 7-zip, you can follow this guide on How To Install 7-zip on Windows.

Now you can easily install your founded package by using the following Scoop command on Windows:

scoop install 7zip
Output
...
'7zip' (22.01) was installed successfully!

To verify your 7-zip installation, you can use the command below:

7z
Output
7-Zip 22.01 (x64) : Copyright (c) 1999-2022 Igor Pavlov : 2022-07-15

Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...] [@listfile]

<Commands>
  a : Add files to archive
  b : Benchmark
  d : Delete files from archive
  e : Extract files from archive (without using directory names)
  h : Calculate hash values for files
  i : Show information about supported formats
  l : List contents of archive
...

Also, you can use the scoop command to install multiple packages on Windows. For example:

scoop install 7zip nodejs

Update Packages with Scoop Package Manager

Scoop lets you get the latest features or bug fixes by running the update command:

scoop update 

You will get the following output:

Output
Scoop uses Git to update itself. Run 'scoop install git' and try again.

So you need to install git first, then re-run the update command:

# scoop install git
# scoop update 
Output
Updating Scoop...
Updating 'main' bucket...
 Converting 'main' bucket to git repo...
Checking repo... OK
The main bucket was added successfully.
Scoop was updated successfully!

Next, verify that your Scoop is updated on your Windows:

scoop status
Output
Scoop is up to date.
Everything is ok!

To update a specific package, you can use the following syntax:

scoop update package-name 

If you want to update your all packages, you can use the command below:

scoop update *

Add Extra buckets and Install Multiple Versions of a Package with Scoop

As you saw before, scoop installs packages from the bucket. If you want to install packages from other buckets beside the main one, you must configure Scoop to know about the bucket on Windows.

First, run the following command to list the known available buckets:

scoop bucket known
Output
main
extras
versions
nirsoft
sysinternals
php
nerd-fonts
nonportable
java
games

Here we want to add the Java bucket by using the command below:

scoop bucket add java
Output
Checking repo... OK
The java bucket was added successfully.

At this point, you can install packages from the Java bucket. For example, we install OpenJDK by using the scoop command from the Java bucket:

scoop install openjdk

This will install the latest version of OpenJDK (v19 at this time of writing).

Output
'openjdk' (19.0.2-7) was installed successfully!

Note: You can install a different version of OpenJDK by specifying the version. This command allows multiple versions of Java to be installed on your system.

For example:

scoop install openjdk17
Output
'openjdk17' (17.0.2-8) was installed successfully!

Switch Between Package Versions with Scoop Package Manager

Now that you have different versions of Java installed on your system, you may want to switch between them. Let’s see how t do it.

You can use the reset command to switch between your package versions.

For example, to switch to your Java 17, you can run the command below:

scoop reset openjdk17
Output
Resetting openjdk17 (17.0.2-8).
Linking ~\scoop\apps\openjdk17\current => ~\scoop\apps\openjdk17\17.0.2-8

To see which Java version is being used, check the version:

java --version
Output
openjdk 17.0.2 2022-01-18
OpenJDK Runtime Environment (build 17.0.2+8-86)
OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing)

If you want to switch back to the latest version of Java, you can use the command below:

scoop reset openjdk
Output
Resetting openjdk (19.0.2-7).
Linking ~\scoop\apps\openjdk\current => ~\scoop\apps\openjdk\19.0.2-7

Verify your Java version:

java --version
Output
openjdk 19.0.2 2023-01-17
OpenJDK Runtime Environment (build 19.0.2+7-44)
OpenJDK 64-Bit Server VM (build 19.0.2+7-44, mixed mode, sharing)

As you can see from the output, Java switched back to the latest version.

For more information, you can visit the Scoop website.

Conclusion

At this point, you have learned to Install Scoop on Windows and Use it on your Windows machine such as install, update, install multiple versions of a package, and switch between package versions.

Hope you enjoy it. You may be like these articles on the Orcacore website:

How To Enable Telnet on Windows 10

Check Windows 10 System Processor Type

Run PowerShell as Administrator on Windows

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

Stay informed and not overwhelmed, subscribe now!