memanto policy purge
Permanently delete memories that have already been expired for longer than the
policy’s purge_expired_after window.
This is the only destructive step in the memory lifecycle and it cannot be undone.
Purged memories are gone from the backend — memanto memory restore will not
bring them back.
Options:
-a, --agent TEXT - Agent identifier (defaults to active agent)
--dry-run - Show what would be deleted without deleting
-y, --yes - Skip the confirmation prompt
Examples:
Output:
Disabled (the default):
With a window set:
purge_expired_after is not a retention setting. retention decides what
becomes expired; this decides when an already-expired memory is destroyed. A
policy where policy apply reports 0 matches can still have
memories eligible for purge.
Notes:
- Disabled unless the policy sets
purge_expired_after. Every preset except aggressive leaves it off.
- Only memories carrying an
expired_at stamp are eligible — an expired record with no stamp has no defensible purge date and is left alone.
- The window is measured from
expired_at, not from when the memory was created.
- Always previews before prompting, even without
--dry-run.
- Backed by the Purge Expired Memories API endpoint.