# ed shelf purge

> Previews and removes shelf items older than an expiry window.

- Canonical URL: https://getedith.pro/docs/cli/shelf/purge
- Updated: 2026-12-02

Previews and removes shelf items older than an expiry window.

```text
ed shelf purge [forever|oneHour|oneDay|oneWeek|oneMonth] [--yes] [--json]
```

Without a window, the command reads `shelfKeepDuration` and falls back to
`forever`. Without `--yes`, it prints the exact file paths it would remove and
does not change the files or index. Add `--yes` to apply the same expiry
executor used by the running Shelf.

```sh
ed shelf purge oneWeek
ed shelf purge oneWeek --yes
ed shelf purge oneDay --json
```

JSON preview output includes `action`, `targets`, `keep`, `removed`, `applied`
and `changed`. Applied output also includes `remaining`. An unknown window exits
2, and a filesystem or index failure exits 1.

## Where to go next

- [`ed shelf`](https://getedith.pro/docs/cli/shelf)
- [`ed config`](https://getedith.pro/docs/cli/config)
- [All `ed` commands](https://getedith.pro/docs/cli)

## Get Edith

Edith is a native Mac app for macOS 14 or later on Apple silicon with 100+ extensions, the `ed` command line and an MCP server. $35 once for one Mac, plus $7 for each additional Mac, with no subscription and a 30-day refund.

- [Buy Edith](https://getedith.pro/pricing): $35 once for one Mac, plus $7 for each additional Mac
- [Download Edith](https://getedith.pro/download): the installer, or Homebrew
