---
title: "af purge"
description: "Request permanent removal of a file's contents from history"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.forge.workreef.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# af purge

<!-- Generated by tools/gen-reference.mjs from `af purge --help`. Change the help text in crates/atoll-forge-cli/src/main.rs, then run `npm run gen:reference`. -->

Purges the contents that PATH has in the commits selected by --revisions. Those contents are deleted wherever they appear, and every commit keeps its ID. The request is refused while main or an open or submitted change still holds the contents: land a change that removes them first.

Acts on the repository given by --repository, or the current workspace's. Requires an administrator; it takes effect at once unless the forge requires a second administrator.

## Usage

```text
af purge [OPTIONS] --revisions <REVISIONS> --reason <REASON> <PATH>
```

## Arguments

- `<PATH>`

  Path of the file, from the repository root

## Options

- `-r, --revisions <REVISIONS>`

  Revset selecting the commits whose contents of PATH are purged

- `--reason <REASON>`

  Reason for the purge, kept permanently in the organization's log

  It must not repeat any of the purged contents.

## Global options

Every `af` command also takes the [global options](https://docs.forge.workreef.dev/reference/af/#global-options).

## Examples

```sh
af purge settings.ini -r 'main-' --reason "a password was committed"
```

Source: https://docs.forge.workreef.dev/reference/af/purge/index.mdx
