
我昨天在我的機器上安裝了 nginx
brew install nginx
今天我想刪除該軟體,因此我嘗試了
brew uninstall nginx
已正確執行。事實上,如果我再次要求卸載 nginx,我會得到
Error: No such keg: /usr/local/Cellar/nginx
問題是下面的文件
/usr/local/etc/nginx
尚未被刪除。
刪除它們的正確方法是什麼?
謝謝
答案1
像往常一樣,使用
rm -f -R /usr/local/nginx
rm -f /usr/local/sbin/nginx
答案2
從航廈,
使用以下命令卸載 nginx:
brew remove nginx
使用以下命令刪除 nginx 設定檔:
rm -r /usr/local/var/run/nginx
答案3
2017 年 11 月 – 酋長岩
看來答案已經過時了。在嘗試了很多選項之後,我終於找到了正確的說明:
從釀造中刪除:
brew remove nginx
刪除配置:
資料夾正在改變;確保該資料夾存在。如果它不存在,那是因為brew 可能會針對未來版本進行更改(我希望不會)。在這種情況下,請告訴我更新我的答案。
rm -f -R /usr/local/etc/nginx
答案4
我遇到了同樣的錯誤,但 nginx 安裝在/usr/local/opt/
.為了解決我所做的:
rm -r /usr/local/opt/nginx