Skip to content

Maintenance

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

An Im maintenance command running in the terminal

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

sh
im :clear
im :clear @yesterday
im :clear @2026-08-14

The 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

sh
im :db prune

This 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 @done first when the history matters.

Backfill older mood data

sh
im :db backfill

Backfill 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

sh
im :db doctor

Doctor 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 :embed reads 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.