Delete a depot
If a depot was inadvertently created or depot file content becomes obsolete, consider removing that depot and all of its content.
For local
depots and a Spec depot
, p4
obliterate
removes the versioned files as well as all
their associated metadata.
For remote
depots, the files and metadata on the remote server
remain because p4
obliterate
removes only the local client and
label records. See Remote depots and multi-server development.
- Remove the contents of the depot.
For stream depots, see the
-d depotname
option of thep4 depot
command in the Helix Core Command-Line (P4) Reference.- For depots that are not stream depots, remove all the files in the depot with the
p4 obliterate
command. Before you usep4 obliterate
, see the warnings in thep4 obliterate
topic of Helix Core Command-Line (P4) Reference. Consider using the report mode, which provides a preview of the files that would be permanently removed. If you are certain that you want to permanently remove the files, include the-y
option of thep4 obliterate
command.
- Specify the depot to delete:
- For an installation with a single server, run the
p4 depot -d
command.depotname
In a multi-server environment, a Commit Server and one or more Edge Servers might each have an Unload depot. However, the content of each unload depot might be different from that of the other unload depots. Before removing any of the unload depots, check each of them to determine whether you want to preserve any of its content. If you do not want to preserve an unload depot, you can delete it, even if it is not empty. On the Commit Server, run
p4 depot -d -f nameOfUnloadDepotToDelete
- For an installation with a single server, run the