ARMARA Course 05

Course 05 / Module 06

Dry-run, export, prune, in that order, always

Preview a trajectory cleanup, archive the evidence, run a zero-match prune, and verify the prediction.

Level
Intermediate
Time
10 minutes
Commands
4
Finish
A safe cleanup ritual

Video / coming soon

The written lesson is complete now.

Protect the archive destination

The verified 30-day cutoff matched zero fresh rows. Choose a cutoff from real timestamps, not convenience.

Use PowerShell paths and confirm the archive file exists.
01

Say the ritual as one unit

Dry-run, export, prune. Never skip one and never change the order.

02

Count without changing the database

Run in your terminal
armaraos trajectory prune <AGENT> --dry-run --older-than-days 30

The verified command predicted zero deletions.

03

Write the archive before deletion

Run in your terminal
armaraos trajectory export <AGENT> -o steps-archive.jsonl

The real archive was 1,675 bytes and contained both trajectory rows.

04

Prune only when the count is understood

Run in your terminal
armaraos trajectory prune <AGENT> --older-than-days 30
Real dry-run, archive export, zero-row prune, and unchanged trajectory list
Fresh live output / zero predicted / zero deleted / two remain
05

Choose exactly one cutoff

Run in your terminal
armaraos trajectory prune <AGENT> --dry-run --before-recorded-at <UNIX_SECONDS>
Real error when both trajectory prune cutoff selectors are supplied
Fresh live output / selectors are mutually exclusive

Day cutoff means strictly before now minus full UTC days. Timestamp cutoff means strictly before that Unix second.

06

Know what survives

Prune removes trajectory detail rows only. Graph trajectory nodes remain, and both systems share ainl_memory.db.

07

Verify the prediction

Run in your terminal
armaraos trajectory list <AGENT> --limit 5

The verified list still contained both fresh rows, exactly matching the zero-row prediction.

Check it / stop after preview

Predict zero again.

Repeat the 30-day dry-run and confirm the fresh course rows remain. Do not broaden the cutoff for practice.

Safety note

Prune is a permanent database delete with no undo. Dry-run, export, prune, in that order, every time.

Troubleshooting for this sitting
What you seeLikely causeWhat to do
Unexpected preview countThe cutoff is too broad.Stop and inspect timestamps.
Both selectors failThey are mutually exclusive.Choose one.
Archive is emptyNo rows were exported.Recheck list before pruning.
Graph nodes remainOnly detail rows are pruned.Inspect graph memory separately.

Back to Module 5.5

Next / Module 5.7

Give your agent a real tool

Lesson ready