AWS CodeCommit is no longer available to new customers. Existing customers of
AWS CodeCommit can continue to use the service as normal.
Learn more"
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.
Topics
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.
-
Open the CodeCommit console at https://console.aws.amazon.com/codesuite/codecommit/home
. -
In Repositories, choose the name of the repository you want to delete.
-
In the navigation pane, choose Settings.
-
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 (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.