Skip to main content
// Delete a repository
const result = await store.deleteRepo({
  id: "team/project-alpha",
});

console.log(result.message);
// "Repository team/project-alpha deletion initiated. Physical storage cleanup will complete asynchronously."

// Handle deletion errors
try {
  await store.deleteRepo({ id: "non-existent-repo" });
} catch (error) {
  if (error instanceof ApiError) {
    console.error("Delete failed:", error.message);
    if (error.statusCode === 404) {
      console.log("Repository not found or already deleted");
    } else if (error.statusCode === 403) {
      console.log("Missing repo:write permission");
    }
  }
}

Options

ParameterTypeDescription
idRequiredRepository ID to delete

Response

FieldTypeDescription
repoId (TypeScript)
repo_id (Python)
StringThe ID of the deleted repository
messageStringConfirmation message about the deletion

Important Notes

  • Repository deletion is permanent and irreversible
  • All branches, commits, and files are permanently removed