Skip to content

cleanup

snippbot cleanup demo removes content that the hosted demo’s seeder (deploy/demo in the repository) wrote into an install. A plain install never runs the demo seeder, so on most machines this finds nothing. It is for development machines and anyone who ran the demo stack locally.

Terminal window
snippbot cleanup demo # Dry run: show exactly what would change
snippbot cleanup demo --apply # Back up, then ask before each group
snippbot cleanup demo --undo 20261122T201500Z # Put everything from that backup back

To see the report without the cleanup options, run snippbot doctor --demo-residue.


Every finding is one of two kinds.

Demo objects are files and rows the demo seed wrote and nobody has changed since. They are recognised by a marker the seeder leaves (<!-- snippbot-demo-seed v3 --> in agent files, seed=demo on memories, demo_seed on knowledge-graph entities and insights, demo_seeded.json, the demo-owner API key) or by an exact fingerprint of the seeded content: whole files and lines, avatar images, an agent’s bio and tags, and the titles of seeded chats, workflows, loops, jobs, projects, insights and skills. Where an earlier copy exists, the report lists it as a restore source:

Demo objectWhat the cleanup does
A demo agent (its folder and agents row), except the built-in SnippDeletes both
An agent’s IDENTITY.md that is the demo’sRestores the latest earlier copy kept by identity proposals; listed only when there is none
Demo lines in NOTES.md or USER.mdRemoves those lines (in USER.md the persona’s name lines get your name when it is known)
A demo avatarRestores avatar.legacy.* when there is one, otherwise deletes it
An agent row’s demo bio and tagsRestores them from the newest chat.db.bak-* backup that has the earlier values
Seeded chats, workflows, loops, jobs, projects, skills, insights, memories, entities, favorites, dispatcher lines, the demo key, demo_seeded.jsonDeletes them, with their history rows
The demo profile name or emailListed only: change it in Settings → Profile

Name contamination is your real content that repeats the demo persona’s name, for example an agent that called you by the persona’s first name after the demo rewrote its files. Chats, memories, the knowledge graph, push notifications and job output are listed, never changed. In agent notes files (NOTES.md and notes/*.md) you can replace the name with your own, one file at a time.


Terminal window
snippbot cleanup demo [OPTIONS]
OptionDescription
--data-dir PATHData dir to check (default: the one the daemon uses)
--agents-dir PATHAlso scan this agents folder (repeatable)
--applyBack up, then make the changes you confirm. Without it nothing changes
--yes, -yWith --apply: don’t ask, apply every demo-object change. Notes files are renamed only when listed with --rename-file
--name TEXTYour name, to replace the persona’s name in the notes files you pick (default: Settings → Profile)
--rename-file PATHWith --apply: rename the persona’s name in this agent notes file (repeatable; NOTES.md or notes/*.md only)
--undo TSRestore the backup demo-cleanup-TS (printed by --apply)
--forceWith --undo: restore even files edited after the cleanup
--jsonPrint the dry-run report as JSON

The default. It prints each demo object with its store, location, how it was found, any restore source and the exact changes a cleanup would make, then every place with name contamination (store, count, date range and a one-line preview), then a preview of each notes-file rename. Every database is opened read-only and nothing is written.

--apply asks once for the demo-object group, then for your name and for each notes file separately. Nothing is selected by default. Before the first change it:

  1. Copies every affected file and folder, and copies each affected database with the SQLite backup API, into <data dir>/backups/demo-cleanup-<timestamp>/, with a manifest.json. The rows each database change deletes or edits are also saved, just before the change, for undo.
  2. Refuses to continue, changing nothing, when free disk space is less than twice the backup size.
  3. Refuses when a file changed since the dry run’s scan.

Each change is appended to <data dir>/backups/demo-cleanup-audit.jsonl. Restart the daemon afterwards (snippbot service restart) so agents reload their files.

Terminal window
# Non-interactive: demo objects plus one notes file
snippbot cleanup demo --apply --yes --name Sai \
--rename-file ~/.snippbot/agents/snipp/workspace/notes/handoff-notes.md

--undo <timestamp> copies every backed-up file and folder back, removes files the cleanup created (such as a restored avatar.png), and puts back exactly the database rows the cleanup deleted or changed. Rows written since (new chats, for example) are kept. If a file the cleanup wrote was edited afterwards, undo stops without changing anything and lists it; --force restores it anyway. The full database copies stay in the backup folder for manual recovery.