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
| Flag | Type | Default | Description |
|---|---|---|---|
--older-than | duration | Remove notifications older than duration (e.g., 48h, 7d, 1w) | |
--keep | int | -1 | Keep only the N most recent notifications (0 = remove all, -1 = disabled) |
--dry-run | bool | false | Show 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 hours7d- 7 days1w- 1 week2w- 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
- histui get - Query notifications
- histuid Configuration - Automatic pruning settings