Delete an Amazon CodeCommit repository - Amazon CodeCommit
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.

Delete an Amazon CodeCommit repository

You can use the CodeCommit console or the Amazon 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.www.amazonaws.cn/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 General tab, 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 (Amazon CLI)

To use Amazon CLI commands with CodeCommit, install the Amazon CLI. For more information, see Command line reference.

To use the Amazon 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.