Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions,
see Getting Started with Amazon Web Services in China
(PDF).
Delete a Distributor
package
This section describes how to a delete a package. You can't delete a version of a
package, only the entire package.
Deleting a package using the
console
You can use the Amazon Systems Manager console to delete a package or a package version
from Distributor, a tool in Amazon Systems Manager. Deleting a package deletes all versions of a
package from Distributor.
To delete a package using the console
Open the Amazon Systems Manager console at https://console.amazonaws.cn/systems-manager/.
-
In the navigation pane, choose Distributor.
-
On the Distributor home page, choose the package
that you want to delete.
-
On the package's details page, choose Delete
package.
-
When you're prompted to confirm the deletion, choose Delete
package.
Deleting a package
version using the console
You can use the Systems Manager console to delete a package version from
Distributor.
To delete a package version using the console
Open the Amazon Systems Manager console at https://console.amazonaws.cn/systems-manager/.
-
In the navigation pane, choose Distributor.
-
On the Distributor home page, choose the package
that you want to delete a version of.
-
On the versions page for the package, choose the version to delete and
choose Delete version.
-
When you're prompted to confirm the deletion, choose Delete
package version.
Deleting a package using the
command line
You can use your preferred command line tool to delete a package from
Distributor.
- Linux & macOS
-
To delete a package using the Amazon CLI
-
Run the following command to list documents for specific
packages. In the results of this command, look for the
package that you want to delete.
aws ssm list-documents \
--filters Key=Name,Values=package-name
-
Run the following command to delete a package. Replace
package-name
with the package
name.
aws ssm delete-document \
--name "package-name
"
-
Run the list-documents command again to
verify that the package was deleted. The package you deleted
shouldn't be included in the list.
aws ssm list-documents \
--filters Key=Name,Values=package-name
- Windows
-
To delete a package using the Amazon CLI
-
Run the following command to list documents for specific
packages. In the results of this command, look for the
package that you want to delete.
aws ssm list-documents ^
--filters Key=Name,Values=package-name
-
Run the following command to delete a package. Replace
package-name
with the package
name.
aws ssm delete-document ^
--name "package-name
"
-
Run the list-documents command again to
verify that the package was deleted. The package you deleted
shouldn't be included in the list.
aws ssm list-documents ^
--filters Key=Name,Values=package-name
- PowerShell
-
To delete a package using Tools for PowerShell
-
Run the following command to list documents for specific
packages. In the results of this command, look for the
package that you want to delete.
$filter = New-Object Amazon.SimpleSystemsManagement.Model.DocumentKeyValuesFilter
$filter.Key = "Name"
$filter.Values = "package-name
"
Get-SSMDocumentList `
-Filters @($filter)
-
Run the following command to delete a package. Replace
package-name
with the package
name.
Remove-SSMDocument `
-Name "package-name
"
-
Run the Get-SSMDocumentList command
again to verify that the package was deleted. The package
you deleted shouldn't be included in the list.
$filter = New-Object Amazon.SimpleSystemsManagement.Model.DocumentKeyValuesFilter
$filter.Key = "Name"
$filter.Values = "package-name
"
Get-SSMDocumentList `
-Filters @($filter)
Deleting a package version
using the command line
You can use your preferred command line tool to delete a package version from
Distributor.
- Linux & macOS
-
To delete a package version using the Amazon CLI
-
Run the following command to list the versions of your
package. In the results of this command, look for the
package version that you want to delete.
aws ssm list-document-versions \
--name "package-name
"
-
Run the following command to delete a package version.
Replace package-name
with the
package name and version
with the
version number.
aws ssm delete-document \
--name "package-name
" \
--document-version version
-
Run the list-document-versions command
to verify that the version of the package was deleted. The
package version that you deleted shouldn't be found.
aws ssm list-document-versions \
--name "package-name
"
- Windows
-
To delete a package version using the Amazon CLI
-
Run the following command to list the versions of your
package. In the results of this command, look for the
package version that you want to delete.
aws ssm list-document-versions ^
--name "package-name
"
-
Run the following command to delete a package version.
Replace package-name
with the
package name and version
with the
version number.
aws ssm delete-document ^
--name "package-name
" ^
--document-version version
-
Run the list-document-versions command
to verify that the version of the package was deleted. The
package version that you deleted shouldn't be found.
aws ssm list-document-versions ^
--name "package-name
"
- PowerShell
-
To delete a package version using Tools for PowerShell
-
Run the following command to list the versions of your
package. In the results of this command, look for the
package version that you want to delete.
Get-SSMDocumentVersionList `
-Name "package-name
"
-
Run the following command to delete a package version.
Replace package-name
with the
package name and version
with the
version number.
Remove-SSMDocument `
-Name "package-name
" `
-DocumentVersion version
-
Run the Get-SSMDocumentVersionList
command to verify that the version of the package was
deleted. The package version that you deleted shouldn't be
found.
Get-SSMDocumentVersionList `
-Name "package-name
"
For information about other options you can use with the
list-documents command, see list-documents in the Amazon Systems Manager section of the
Amazon CLI Command Reference. For information about other options
you can use with the delete-document command, see delete-document.