Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 CLI Reference | 2025.1

# p4 graph purge-refhist (graph)

Delete refhist records for a repo.

## Syntax

    p4 graph purge-refhist -n repo [-B date] [-y]

Syntax conventions

## Description

The command deletes reference history records for a repo. These are for references that are already removed from the ref table.

## Options

`-n` | The repo name, with the `.git` suffix. For example, `//graphdepot1/repoA.git`
`-B` | Limits the deletion of reference history to records prior to the specified date, preserving more recent records.
`-y` | By default, the command displays a preview of the results. To execute the operation, include the `-y` option.

## Usage notes

Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required
--- | --- | ---
N/A | N/A | Either repo `admin`, based on p4 grant-permission (graph), or the owner of the repo.

## Example

See Delete a repo and free the used storage in the Work with Git in P4 Server Administration Documentation.

## Related commands

To delete records of orphaned objects from the object table. | p4 graph gc (graph)
To recompute object refcounts in the object table. | p4 graph recompute-refcnts (graph)

Your search for returned results