Delete a repo and free the used storage
Warning
The following steps cause permanent removal with no possibility of recovery.
The user who performs these steps needs the super
access level through p4 protect.
-
Delete the repo metadata with
p4 repo -d [-f] repoName
-
Delete the repo archive directory:
-
on Linux or MacOS:
rm -r <DepotDir>/<repoName>.git
-
on Windows:
rd /s /q <DepotDir>\<repoName>.git
-
Delete the related reference history records by running p4 graph purge-refhist (graph)
-
Run p4 graph gc to get a preview.
-
Run p4 graph gc -y