一款优雅的Windows包管理器Scoop

前言

Scoop 作为一款较为流行的 Windows 包管理器,用它来下载软件、管理版本十分方便。

什么是 Scoop

Scoop 是一款适用于 Windows 平台的命令行软件(包)管理工具,这里是Scoop 官网。简单来说,就是可以通过命令行工具(PowerShell、CMD 等)实现软件(包)的安装管理等需求,通过简单的一行代码实现软件的下载、安装、卸载、更新等操作。其灵感来源于 macOS 的Homebrew

当然如果用过 Linux 系统,使用 apt-get 工具安装过软件,或者用过 Python,知道 pip 工具用于管理 Python 各种依赖包,那么理解 Scoop 就比较容易,这些工具的设计理念与使用方法都非常类似。

Scoop 从 bucket 下载的软件是绿色安全的,不会附带广告之类的扰人组件,同时它也让安装变得很简单。Scoop 凭借 shims(垫片机制)使得在 windows 下管理环境变量十分简单,用户只需执行简单的 CLI 命令来安装程序,Scoop 会默认添加环境变量,从而使得整个过程十分顺滑。

安装 Scoop

> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser> irm get.scoop.sh -outfile 'install.ps1'> .\install.ps1 -ScoopDir 'D:\Scoop' -ScoopGlobalDir 'F:\GlobalScoopApps' -NoProxy

使用 Scoop

scoop help

scoop 基本语法命令:

> scoop helpUsage: 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 aliasesbucket     Manage Scoop bucketscache      Show or clear the download cachecat        Show content of specified manifest.checkup    Check for potential problemscleanup    Cleanup apps by removing old versionsconfig     Get or set configuration valuescreate     Create a custom app manifestdepends    List dependencies for an app, in the order they'll be installeddownload   Download apps in the cache folder and verify hashesexport     Exports installed apps, buckets (and optionally configs) in JSON formathelp       Show help for a commandhold       Hold an app to disable updateshome       Opens the app homepageimport     Imports apps, buckets and configs from a Scoopfile in JSON formatinfo       Display information about an appinstall    Install appslist       List installed appsprefix     Returns the path to the specified appreset      Reset an app to resolve conflictssearch     Search available appsshim       Manipulate Scoop shimsstatus     Show status and check for new app versionsunhold     Unhold an app to enable updatesuninstall  Uninstall an appupdate     Update apps, or Scoop itselfvirustotal Look for app's hash or url on virustotal.comwhich      Locate a shim/executable (similar to 'which' on Linux)
scoop bucket

scoop 桶命令,用来管理添加、删除已有桶。

> scoop bucket --helpUsage: scoop bucket add|list|known|rm [<args>]Add, list or remove buckets.Buckets are repositories of apps available to install. Scoop comes witha default bucket, but you can also add buckets that you or others havepublished.To add a bucket:    scoop bucket add <name> [<repo>]e.g.:    scoop bucket add extras https://github.com/ScoopInstaller/Extras.gitSince the 'extras' bucket is known to Scoop, this can be shortened to:    scoop bucket add extrasTo list all known buckets, use:    scoop bucket known
scoop search

scoop 用来搜索软件的命令,可以选择 scoop-search 替代。

> scoop search dotnet-sdk-ltsResults from local buckets...Name           Version Source   Binaries----           ------- ------   --------dotnet-sdk-lts 8.0.412 versions> scoop-search dotnet-sdk-lts'versions' bucket:    dotnet-sdk-lts (8.0.412)
scoop instal、scoop uninstall

安装软件与卸载软件

> scoop install --helpUsage: scoop install <app> [options]e.g. The usual way to install an app (uses your local 'buckets'):     scoop install gitTo install a different version of the app(note that this will auto-generate the manifest using current version):     scoop install gh@2.7.0To install an app from a manifest at a URL:     scoop install https://raw.githubusercontent.com/ScoopInstaller/Main/master/bucket/runat.jsonTo install a different version of the app from a URL:      scoop install https://raw.githubusercontent.com/ScoopInstaller/Main/master/bucket/neovim.json@0.9.0To install an app from a manifest on your computer     scoop install \path\to\app.jsonTo install an app from a manifest on your computer     scoop install \path\to\app.json@versionOptions:  -g, --global                    Install the app globally  -i, --independent               Don't install dependencies automatically  -k, --no-cache                  Don't use the download cache  -s, --skip-hash-check           Skip hash validation (use with caution!)  -u, --no-update-scoop           Don't update Scoop before installing if it's outdated  -a, --arch <32bit|64bit|arm64>  Use the specified architecture, if the app supports it> scoop uninstall --helpUsage: scoop uninstall <app> [options]e.g. scoop uninstall gitOptions:  -g, --global   Uninstall a globally installed app  -p, --purge    Remove all persistent data
scoop home

获取软件主页

> scoop home --helpUsage: scoop home <app>
scoop info

获取软件信息

> scoop info gitName        : gitDescription : Distributed version control systemVersion     : 2.50.1Bucket      : mainWebsite     : https://gitforwindows.orgLicense     : GPL-2.0-onlyUpdated at  : 2025/7/9 4:29:40Updated by  : github-actions[bot]Installed   : 2.50.1Binaries    : bin\sh.exe | bin\bash.exe | cmd\git.exe | cmd\gitk.exe | cmd\git-gui.exe | cmd\scalar.exe | usr\bin\tig.e              xe | git-bash.exeShortcuts   : Git Bash | Git GUIEnvironment : GIT_INSTALL_ROOT = <root>Notes       : Set Git Credential Manager Core by running: "git config --global credential.helper manager"              To add context menu entries, run '<root>\install-context.reg'              To create file-associations for .git* and .sh files, run '<root>\install-file-associations.reg'
scoop update、scoop status

更新软件、获取软件更新状态

> scoop update --helpUsage: scoop update <app> [options]'scoop update' updates Scoop to the latest version.'scoop update <app>' installs a new version of that app, if there is one.You can use '*' in place of <app> to update all apps.Options:  -f, --force            Force update even when there isn't a newer version  -g, --global           Update a globally installed app  -i, --independent      Don't install dependencies automatically  -k, --no-cache         Don't use the download cache  -s, --skip-hash-check  Skip hash validation (use with caution!)  -q, --quiet            Hide extraneous messages  -a, --all              Update all apps (alternative to '*')> scoop status --helpUsage: scoop statusOptions:  -l, --local         Checks the status for only the locally installed apps,                      and disables remote fetching/checking for Scoop and buckets

© 2026 Clear