with one click
cleanup-historical-data
// Clean up old agents, their output directories, and other historical data. Use during nightly cleanup or when the system has accumulated stale data.
// Clean up old agents, their output directories, and other historical data. Use during nightly cleanup or when the system has accumulated stale data.
Submit a bug report to libraries within the `mngr` project (eg, `mngr`, its plugins, `minds`, etc). Use to report bugs you encounter while running that seem to be issues with the `mngr` code itself, rather than with your own code or configuration.
Run commands to explore the current state of mngr and any relevant running agents. Use this skill when you need to debug issues with mngr tasks, or understand what tasks are currently running and their states.
Handle events from the mngr/agent_states source about sub-agent state transitions (finished, waiting, done, etc). You **MUST** use this skill (and *carefully follow the process in this doc*) whenever you receive a message from the "mngr/agent_states" source!
Handle unexpected situations where the Minds system does not appear to be working as expected. Use when you encounter behavior that seems to contradict what your docs and prompts and skills say should happen, or when something seems broken and you are unsure how to proceed.
Create a sub-agent to perform a task. Use when you need to delegate work to another agent, for example, a working agent (for actually accomplishing some task) or a verifying agent (for deciding what to do about the output of a working agent).
Handle events from the messages source about user or assistant messages in conversations. You **MUST** use this skill (and *carefully follow the process in this doc*) whenever you receive a message from the "messages" source!
| name | cleanup-historical-data |
| description | Clean up old agents, their output directories, and other historical data. Use during nightly cleanup or when the system has accumulated stale data. |
Over time, archived agents and their output directories accumulate. This skill describes how to clean them up.
Find agents that were archived more than a week ago and destroy them:
mngr list --include "has(labels.archived_at)" --exclude "id == \"$AGENT_ID\"" --format jsonl
For each agent in the list, check the archived_at label.
If it is more than a week old, destroy the agent:
mngr destroy -f <agent-id>
When destroying an agent, also remove its output directory:
rm -rf output/<agent-id>
Before removing, check if the output directory contains anything that should be preserved (e.g., reports, data files, or artifacts that haven't been moved to a permanent location). If in doubt, leave it -- it's better to have stale data than to lose something important.