AWS CodeCommit
User Guide (API Version 2015-04-13)

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

Delete an AWS CodeCommit Repository

You can use the CodeCommit console or the AWS CLI to delete a CodeCommit repository.

Note

Deleting a repository does not delete any local copies of that repository (local repos). To delete a local repo, use your local machine's directory and file management tools.

Delete a CodeCommit Repository (Console)

Follow these steps to use the CodeCommit console to delete a CodeCommit repository.

Important

After you delete a CodeCommit repository, you are no longer able to clone it to any local repo or shared repo. You are also no longer able to pull data from it, or push data to it, from any local repo or shared repo. This action cannot be undone.

  1. Open the CodeCommit console at https://console.aws.amazon.com/codesuite/codecommit/home.

  2. In Repositories, choose the name of the repository you want to delete.

  3. In the navigation pane, choose Settings.

  4. On the Repository settings page, in Delete repository, choose Delete repository. Enter delete, and then choose Delete. The repository is permanently deleted.

    Note

    Deleting the repository in CodeCommit does not delete any local repos.

Delete a Local Repo

Use your local machine's directory and file management tools to delete the directory that contains the local repo.

Deleting a local repo does not delete any CodeCommit repository to which it might be connected.

Delete a CodeCommit Repository (AWS CLI)

To use AWS CLI commands with CodeCommit, install the AWS CLI. For more information, see Command Line Reference.

To use the AWS CLI to delete a CodeCommit repository, run the delete-repository command, specifying the name of the CodeCommit repository to delete (with the --repository-name option).

Important

After you delete a CodeCommit repository, you are no longer able to clone it to any local repo or shared repo. You are also no longer able to pull data from it, or push data to it, from any local repo or shared repo. This action cannot be undone.

Tip

To get the name of the CodeCommit repository, run the list-repositories command.

For example, to delete a repository named MyDemoRepo:

aws codecommit delete-repository --repository-name MyDemoRepo

If successful, the ID of the CodeCommit repository that was permanently deleted appears in the output:

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

Deleting a CodeCommit repository does not delete any local repos that might be connected to it.