所有 Homebrew-cask 的指令 都以 brew cask 開頭
列出已安裝的 casks
>>> brew cask list
查看某個已經安裝的 cask 細節
>>> brew info <cask>>>> brew cask list macdown
搜尋 cask
>>> brew cask search <cask>
安裝 cask
>>> brew cask install <cask>
移除 cask
>>> brew cask uninstall <cask>
刪除某個 cask 的所有版本
>>> brew cask uninstall --force <cask>
更新 升級 Cask
>>> brew update
也會更新 Casks
目前 homebrew-cask 並不總是能判斷 Application 是否已經被 updated 需要透過下列的方式更新
>>> brew cask install --force <cask>
比較安全的做法是 在 Application 內 藉由 Application 本身 update 的機制 update Application
更新 升級 Homebrew-cask
當 homebrew-cask 新的版本被 release 後 它就會被列在
>>> brew update && brew outdated
使用 brew update 進行升級
>>> brew update && brew upgrade brew-cask && brew cleanup && brew cask cleanup
常見問題
透過 cask 安裝的軟體 如果本身就有 auto-update 的機制 (像是 firefox) 該軟體的 auto-update 機制會一切如常的正常運作
只有一點需要注意 即便軟體的版本更新了 例如 (假設安裝時 版本是1.3) 某個 application 被安裝在 /opt/homebrew-cask/Caskroom/mygreatapp/1.3 但該軟體可能透過自己的 auto-update 機制 現在的版本已經是 1.4
FAQ
brew cask list shows that a package is installed, but when I try to do brew cask uninstall, it tells me that the package is not installed. Help!
This is a problem with the bookkeeping in the current implementation of Cask, which gets confused if a cask is updated after installation. For now, use the brew cask uninstall --force to uninstall these packages.