← 返回命令列表

Linux command

brew-cask 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Install an application

brew install --cask [firefox]

List installed casks

brew list --cask

Search for a cask

brew search --cask [application-name]

Get information

brew info --cask [firefox]

Upgrade a cask

brew upgrade --cask [firefox]

Upgrade all casks

brew upgrade --cask --greedy

Uninstall a cask

brew uninstall --cask [firefox]

Uninstall and remove

brew uninstall --cask --zap [firefox]

Install to custom directory

brew install --cask --appdir=[~/Applications] [firefox]

说明

brew --cask (formerly Homebrew Cask) manages the installation of macOS applications distributed as binary packages (.dmg, .pkg, .app). It automates downloading, installing to /Applications, and removing GUI applications. Cask extends Homebrew's command-line workflow to desktop applications like browsers, editors, and utilities that would normally require manual drag-and-drop installation.

参数

--appdir _path_
Install applications to specified directory (default: /Applications)
--fontdir _path_
Install fonts to specified directory
--greedy
Include self-updating apps in upgrade
--zap
Remove all files associated with cask (including preferences)
--force
Force install even if already installed
--no-quarantine
Disable macOS quarantine attribute

FAQ

What is the brew-cask command used for?

brew --cask (formerly Homebrew Cask) manages the installation of macOS applications distributed as binary packages (.dmg, .pkg, .app). It automates downloading, installing to /Applications, and removing GUI applications. Cask extends Homebrew's command-line workflow to desktop applications like browsers, editors, and utilities that would normally require manual drag-and-drop installation.

How do I run a basic brew-cask example?

Run `brew install --cask [firefox]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --appdir _path_ do in brew-cask?

Install applications to specified directory (default: /Applications)