v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
VersionControl
Repository Management

Delete Git repository

This function deletes a cPanel account's Git™ repository. For more information about support for version control in cPanel & WHM, read our Git Version Control and Guide to Git documentation.

Warning:

  • When you call this function, the system permanently deletes the entire contents of the specified directory. You cannot recover this data after deletion.
  • You cannot use this function to delete any repositories that do not appear in the cache of repositories (for example, repositories that contain invalid characters or exist within cPanel-controlled directories).
get/VersionControl/delete

Query parameters

repository_rootstring required
Example:/home/user/example

The absolute directory path in the user's home directory containing the repository to delete.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "delete",
  "module": "VersionControl",
  "result": {
    "status": 1
  }
}