Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
解除安裝 Google Cloud CLI
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
如果是使用 OS 套件 (例如
apt-get 或
yum) 完成安裝,請使用 OS 套件管理員解除安裝 gcloud CLI。
如果是 Windows 安裝作業,請執行 gcloud CLI 目錄中的 uninstaller.exe 檔案。
如要移除 gcloud CLI,請按照下列操作說明操作:
請執行下列指令找出您的安裝目錄:
gcloud info --format='value(installation.sdk_root)'
執行下列指令,找出使用者設定目錄 (通常是 MacOS 和 Linux 上的 ~/.config/gcloud):
gcloud info --format='value(config.paths.global_config_dir)'
同時刪除兩個目錄。
此外,如果安裝時在您的 .bashrc 或相等於殼層初始化檔案中加入原始碼行 completion.bash.inc 和 path.bash.inc,請移除這些原始碼行。
檢查主目錄中的 .boto 檔案內容,然後移除 [GoogleCompute] 和 [GSUtil] 區段。此外,請檢查 [OAuth2] 和 [Credentials] 區段,確認是否還有不再需要的設定。
部分系統可能會有 Cache 目錄,例如 Mac OS X 上的 ~/Library/Caches/。找出並刪除系統的這些目錄:
find ~/Library/Caches/ -type d -name "google-cloud-sdk" | xargs -I {} rm -r "{}"
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2026-05-22 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2026-05-22 (世界標準時間)。"],[],[]]