Deleting depots

To delete a depot, it must be empty.

  1. Remove all the files in the depot. See the p4 obliterate command.
  2. Specify the depot to delete: p4 depot -d depotname

For local depots and Spec depot, p4 obliterate deletes the versioned files as well as all their associated metadata. For remote depots, p4 obliterate erases only the locally held client and label records. The files and metadata remain on the remote server remain. (See Remote depots and multi-server development.)

Before you use p4 obliterate, and especially if you’re about to use it to obliterate all files in a depot, see the warnings in Reclaiming disk space by obliterating files.

In a multi-server environment, the Unload depot might have different contents on each edge server. The commit server does not verify that the unload depot is empty on every edge server. Therefore, you must specify p4 depot -d -f to delete the unload depot from the commit server.