“Unlinked kegs in your Cellar”. How do I remove them?

后端 未结 7 1338
一个人的身影
一个人的身影 2021-02-02 07:53

After installing and uninstalling some programs through brew and brew cask, now I get brew doctor saying \"unlinked kegs in your Cellar\".

7条回答
  •  一整个雨季
    2021-02-02 08:38

    brew 1.9.0

    brew cleanup [options] [formula|cask]

    Remove stale lock files and outdated downloads for all formulae and casks, and remove old versions of installed formulae. If arguments are specified, only do this for the given formulae and casks.

       --prune                      Remove all cache files older than specified
                                     days.
    -n, --dry-run                    Show what would be removed, but do not
                                     actually remove anything.
    -s                               Scrub the cache, including downloads for
                                     even the latest versions. Note downloads
                                     for any installed formula or cask will
                                     still not be deleted. If you want to delete
                                     those too: rm -rf "$(brew --cache)"
        --prune-prefix               Only prune the symlinks and directories
                                     from the prefix and remove no other files.
    -v, --verbose                    Make some output more verbose.
    -d, --debug                      Display any debugging information.
    -h, --help                       Show this message.
    

    Older versions

    brew prune [--dry-run]: Remove dead symlinks from the Homebrew prefix. This is generally not needed, but can be useful when doing DIY installations. Also remove broken app symlinks from /Applications and ~/Applications that were previously created by brew linkapps.

    If --dry-run or -n is passed, show what would be removed, but do not actually remove anything.

提交回复
热议问题