Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Use DeleteRepository with a CLI - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

Use DeleteRepository with a CLI

The following code examples show how to use DeleteRepository.

CLI
AWS CLI

To delete a repository

This example shows how to delete an AWS CodeCommit repository.

Command:

aws codecommit delete-repository --repository-name MyDemoRepo

Output:

{ "repositoryId": "f7579e13-b83e-4027-aaef-650c0EXAMPLE" }
PowerShell
Tools for PowerShell

Example 1: This example forcibly deletes the specified repository. The command will prompt for confirmation before proceeding. Add the -Force parameter to delete the repository without a prompt.

Remove-CCRepository -RepositoryName MyDemoRepo

Output:

43ef2443-3372-4b12-9e78-65c27EXAMPLE
  • For API details, see DeleteRepository in AWS Tools for PowerShell Cmdlet Reference.

AWS CLI

To delete a repository

This example shows how to delete an AWS CodeCommit repository.

Command:

aws codecommit delete-repository --repository-name MyDemoRepo

Output:

{ "repositoryId": "f7579e13-b83e-4027-aaef-650c0EXAMPLE" }
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.