Maintenance
Keep your local Im history tidy, clear a day, and repair records after changing tracker definitions.

Overview
Maintenance commands are explicit and local. Use them when you want to remove old tasks, clear a day's entries, or review data after changing configuration.
Basics
Clear a day
im :clear
im :clear @yesterday
im :clear @2026-08-14The command counts mood and journal entries for the selected day, asks for confirmation in the interactive view, and then removes them. Tracker records attached to those entries are removed with them. Tasks are not removed.
Prune finished tasks
im :db pruneThis removes completed oneshot tasks and recurring tasks whose end time has passed. It also removes cached values that are no longer needed. Use it when completed history no longer needs to stay in the active local store.
Note: Pruning is permanent for the removed task rows. Review
im @donefirst when the history matters.
Backfill older mood data
im :db backfillBackfill fills missing stored mood information used to render colors for older entries. It is safe to run when older rows display without their expected color.
Check tracker records
im :db doctorDoctor compares stored tracker values with the current kind in your configuration. It reports entries that no longer match, including entries for tracker names that were removed. In an interactive terminal it asks before pruning those entries; in plain output it reports the plan without deleting.
Remove individual records
In the interactive today view, select a mood, journal entry, tracker, or task and press delete or ctrl-h. Confirm the prompt to remove it. Deleting a mood also removes tracker records attached to it; deleting a recurring task stops future occurrences.
Diagnostic commands
im :color <mood>prints the projected color for a mood and its color details.im :embedreads non-empty stdin lines and prints one embedding vector per line.
These commands are useful when checking a configuration or an integration, but they do not change your journal or task history.
FAQ
Can I clear tasks with :clear?
No. :clear removes moods, journal entries, and their attached tracker records for one day. Use the task view or :db prune for tasks.
Does :db prune remove recurring tasks that are still active?
No. It removes recurring tasks only after their configured end time has passed. A recurring task with no end time remains available.
Should I run :db doctor after every config edit?
Only after changing a tracker kind or removing tracker definitions. Bounds, colors, and display settings do not change the stored value kind.
