Skip to main content
Version: 0.0.4

histui prune

Remove old notifications from history based on age or count.

Synopsis

histui prune [flags]

Description

The prune command removes notifications from history based on age or count limits. Use it for manual cleanup - note that histuid also provides automatic pruning via the [history].max_notifications config setting.

Options

FlagTypeDefaultDescription
--older-thandurationRemove notifications older than duration (e.g., 48h, 7d, 1w)
--keepint-1Keep only the N most recent notifications (0 = remove all, -1 = disabled)
--dry-runboolfalseShow what would be removed without removing

At least one of --older-than or --keep is required.

Examples

Remove notifications older than 7 days

histui prune --older-than 7d

Keep only the last 100 notifications

histui prune --keep 100

Preview what would be removed

histui prune --older-than 48h --dry-run

Remove all notifications

histui prune --keep 0

Combine age and count limits

# Remove anything older than 1 week AND keep at most 500
histui prune --older-than 1w --keep 500

Duration Format

Durations support various formats:

  • 48h - 48 hours
  • 7d - 7 days
  • 1w - 1 week
  • 2w - 2 weeks

Automatic Pruning

For automatic pruning, configure histuid's retention settings:

[history]
max_notifications = 1000 # Auto-prune when exceeding this limit

See histuid Configuration for details.

See Also