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).
Authorizations:
query Parameters
repository_root
required
string

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

Example: repository_root=/home/user/example

Responses

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object

Request samples

uapi --user=username VersionControl delete repository_root='/home/user/example'

Response samples

Content type
application/json
{
  • "apiversion": 3,
  • "func": "delete",
  • "module": "VersionControl",
  • "result": {
    • "data": null,
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}