

• 2026 年 4 月 30 日之後， AWS Systems Manager CloudWatch Dashboard 將不再可用。客戶可以繼續使用 Amazon CloudWatch 主控台來檢視、建立和管理其 Amazon CloudWatch 儀表板，就像現在一樣。如需詳細資訊，請參閱 [Amazon CloudWatch Dashboard 文件](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html)。

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 解除安裝 Distributor 套件
<a name="distributor-working-with-packages-uninstall"></a>

您可以使用 AWS 管理主控台 或 AWS Command Line Interface (AWS CLI)，透過使用 將Distributor套件從 AWS Systems Manager 受管節點解除安裝Run Command。 Distributor和 Run Command是 中的工具 AWS Systems Manager。在此版本中，您可以解除安裝一個套件版本。您可以解除安裝特定版本或預設版本。

**重要**  
您使用 Distributor 安裝的套件只能使用 Distributor 來解除安裝。否則，Systems Manager 仍可將應用程式註冊為 `INSTALLED`，並導致其他意外的結果。

**Topics**
+ [使用主控台解除安裝套件](#distributor-pkg-uninstall-console)
+ [使用 解除安裝套件 AWS CLI](#distributor-pkg-uninstall-cli)

## 使用主控台解除安裝套件
<a name="distributor-pkg-uninstall-console"></a>

您可以在 Systems Manager 主控台中使用 Run Command 解除安裝套件一次。Distributor 使用 [AWS Systems Manager Run Command](run-command.md) 來解除安裝套件。

**使用主控台解除安裝套件**

1. 在 https：//[https://console.aws.amazon.com/systems-manager/](https://console.aws.amazon.com/systems-manager/) 開啟 AWS Systems Manager 主控台。

1. 在導覽窗格中，選擇 **Run Command**。

1. 在 Run Command 首頁選擇 **Run command (執行命令)**。

1. 選擇 `AWS-ConfigureAWSPackage` 命令文件。

1. 從 **Action (動作)**，選擇 **Uninstall (解除安裝)** 

1. 在 **Name (名稱)** 輸入您想解除安裝的套件名稱。

1. 對於 **Targets** (目標)，選擇您想要如何鎖定受管節點。您可以指定目標共用的標籤索引鍵和值。您也可以選擇屬性來指定目標，屬性包括 ID、平台和 SSM Agent 版本等。

1. 您可以使用進階選項來新增有關作業的註解、變更 **Rate control** (比率控制) 中的 **Concurrency** (並行) 和 **Error threshold** (錯誤閾值) 值、指定輸出選項，或設定 Amazon Simple Notification Service (Amazon SNS) 通知。如需詳細資訊，請參閱此指南中的[從主控台執行命令](https://docs.aws.amazon.com/systems-manager/latest/userguide/rc-console.html)。

1. 準備好解除安裝套件時，請選擇 **Run** (執行)，然後選擇 **View results** (檢視結果)。

1. 在命令清單中，選擇您剛剛執行的 `AWS-ConfigureAWSPackage` 命令。如果命令仍在進行中，選擇主控台右上角的重新整理圖示。

1. **Status** (狀態) 列顯示 **Success** (成功) 或 **Failed** (失敗) 時，請選擇 **Output** (輸出) 標籤。

1. 選擇 **View output (檢視輸出)**。此指令輸出頁面會顯示指令執行的結果。

## 使用 解除安裝套件 AWS CLI
<a name="distributor-pkg-uninstall-cli"></a>

您可以使用 從受管節點 AWS CLI 解除安裝Distributor套件，方法是使用 Run Command。

**使用 解除安裝套件 AWS CLI**
+ 在 AWS CLI中執行以下命令。

  ```
  aws ssm send-command \
      --document-name "AWS-ConfigureAWSPackage" \
      --instance-ids "instance-IDs" \
      --parameters '{"action":["Uninstall"],"name":["package-name (in same account) or package-ARN (shared from different account)"]}'
  ```

  下列是 範例。

  ```
  aws ssm send-command \
      --document-name "AWS-ConfigureAWSPackage" \
      --instance-ids "i-02573cafcfEXAMPLE" \
      --parameters '{"action":["Uninstall"],"name":["Test-ConfigureAWSPackage"]}'
  ```

如需有關可與 **send-command**命令搭配使用之其他選項的資訊，請參閱 *AWS CLI 命令參考*的 [https://docs.aws.amazon.com/cli/latest/reference/ssm/send-command.html](https://docs.aws.amazon.com/cli/latest/reference/ssm/send-command.html) AWS Systems Manager 一節。