Skip to main content

Soft delete vs hard delete

Archive (soft)

Hides a memory from recall but keeps the row - fully reversible. The default for forget / delete.

Purge (hard)

Removes the row, its search vector, and graph links - not reversible. delete --hard only.

Commands

pmb forget <ulid>            # archive one memory (reversible)
pmb delete <ulid...>         # archive after preview + confirmation
pmb delete <ulid...> --hard  # permanently purge after confirmation
pmb restore <ulid>           # bring back a soft-deleted / archived memory
pmb forget-topic project-x --dry-run   # archive everything about a topic

Clean up automatic writes

If an untrusted session or a noisy agent run may have polluted memory, archive what the ambient layer wrote itself:
pmb forget-auto --minutes 120   # archive source=autowrite from the last 2h
Set an expiry instead of deleting: pmb ttl <ulid> 30d, then pmb prune-expired (from cron) archives anything past its TTL. Pinned memories (pmb pin <ulid>) are never auto-archived.