banner
LI JIAJUN

LI JIAJUN

# Hello !
github
twitter
zhihu

Using scoop in Windows

scoop is a package management tool for Windows.

Introduction#

scoop is a package management tool for the Windows environment. In the Windows environment, it has always been a problem to install software consistently, such as going to the official website, using winget, or even wingetUI. scoop provides downloads for common software, eliminating the need for manual downloads and configuring environment variables.

For example, to install Python:

scoop install python

Installation#

Go to the official website: https://scoop.sh/

Execute the following code in PowerShell:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression

If you encounter the error "Running the installer as administrator is disabled by default, see https://github.com/ScoopInstaller/Install#for-admin for details.", you can enter the following code:

iex "& {$(irm get.scoop.sh)} -RunAsAdmin"

Then you can proceed with the installation.

image-20240405205225568

Enter scoop help to check if the installation was successful.

image-20240405205519324

Usage#

To use scoop, simply enter commands in the command line.

image-20240405210033694

Common commands include:

  • search: search for software
  • install: install software
  • update: update software
  • status: view software status
  • uninstall: uninstall software
  • info: open software details
  • home: open software homepage

Installation Location#

So where does scoop install the software?

scoop downloads and installs software in the user's folder.

Specifically, for Windows, it creates a scoop folder under C:\Users\Username and installs the software in this folder.

This has the advantage of installing software in a relatively unified file path.

Adding Buckets#

A bucket is a software repository that determines where scoop downloads software from. However, the developer of scoop has strict requirements for the software allowed in the default software repository, such as no GUI. Therefore, we can add our own buckets.

The command to add a bucket is simple:

scoop bucket add <bucket name>

image-20240405211629908

We can also check which buckets scoop can recognize and then choose to add them:

scoop bucket known

image-20240405211135598

Of course, we should first see which buckets are already installed:

Use:

scoop bucket list

image-20240405211515317

Aliases#

By configuring the following aliases, it is more convenient to use scoop.

scoop alias add i 'scoop install $args[0]' 'Install app'
scoop alias add remove 'scoop uninstall $args[0]' 'Uninstall an app'
scoop alias add rm 'scoop uninstall $args[0]' 'Uninstall an app'
scoop alias add add 'scoop install $args[0]' 'Install app'

Configuring Proxy#

# Set the proxy for Scoop to access GitHub to your HTTP proxy
scoop config proxy 127.0.0.1:7890
# View Scoop configuration information
scoop config

Other Commands#

Delete the cache of a specific app: scoop cache rm <app>
Delete all package caches: scoop cache rm *
Delete old versions of a specific app: scoop cleanup <app>

Prevent a program from updating: scoop hold <app>
Allow a program to update: scoop unhold <app>
Update all/one software: scoop update */<app>
Update scoop itself: scoop update

Switch versions of the same program: scoop reset app@version
Switch to the latest version: scoop reset idea-ultimate-eap
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.