我正在尝试删除Homebrew,以便我可以将其安装在另一个帐户上。但在某个地方,我一定搞砸了。我按照常见问题解答中的卸载提示,我认为我设法部分删除它。现在,当我尝试酿造医生时,我得到了:
-bash: brew: command not found
所以我认为它已部分卸载。但是,当我运行Homebrew安装脚本时,我收到以下消息:
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
所以我试试rm -rf / usr / local / Cellar /usr/local/.git&&酿造清理并得到:
rm: /usr/local/.git/branches: Permission denied
rm: /usr/local/.git/config: Permission denied
rm: /usr/local/.git/description: Permission denied
rm: /usr/local/.git/FETCH_HEAD: Permission denied
rm: /usr/local/.git/HEAD: Permission denied
rm: /usr/local/.git/hooks/applypatch-msg.sample: Permission denied
rm: /usr/local/.git/hooks/commit-msg.sample: Permission denied
rm: /usr/local/.git/hooks/post-update.sample: Permission denied
rm: /usr/local/.git/hooks/pre-applypatch.sample: Permission denied
rm: /usr/local/.git/hooks/pre-commit.sample: Permission denied
rm: /usr/local/.git/hooks/pre-rebase.sample: Permission denied
rm: /usr/local/.git/hooks/prepare-commit-msg.sample: Permission denied
rm: /usr/local/.git/hooks/update.sample: Permission denied
rm: /usr/local/.git/hooks: Permission denied
rm: /usr/local/.git/info/exclude: Permission denied
rm: /usr/local/.git/info: Permission denied
rm: /usr/local/.git/logs/refs/remotes/origin/master: Permission denied
rm: /usr/local/.git/logs/refs/remotes/origin: Permission denied
rm: /usr/local/.git/logs/refs/remotes: Permission denied
rm: /usr/local/.git/logs/refs: Permission denied
rm: /usr/local/.git/logs: Permission denied
rm: /usr/local/.git/objects/info: Permission denied
rm: /usr/local/.git/objects/pack/pack-f61919e44996693539de9ee7986ee3c78a0b7c2a.idx: Permission denied
rm: /usr/local/.git/objects/pack/pack-f61919e44996693539de9ee7986ee3c78a0b7c2a.pack: Permission denied
rm: /usr/local/.git/objects/pack: Permission denied
rm: /usr/local/.git/objects: Permission denied
rm: /usr/local/.git/refs/heads: Permission denied
rm: /usr/local/.git/refs/remotes/origin/master: Permission denied
rm: /usr/local/.git/refs/remotes/origin: Permission denied
rm: /usr/local/.git/refs/remotes: Permission denied
rm: /usr/local/.git/refs/tags: Permission denied
rm: /usr/local/.git/refs: Permission denied
rm: /usr/local/.git: Directory not empty
现在我没有关于该做什么的想法,所以我可以重新安装它。我对终端命令并不熟悉,所以我可能会遗漏一些简单的东西,但请提出建议。
答案 0 :(得分:2)
尝试
sudo rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
brew cleanup
无论如何都无法工作。但也许它会允许你在那之后重新安装Homebrew。