I think that’s probably best for now. We don’t have anything for trimming the record store.
Running deletions will always increase the size of records - it needs to record that fact that xyz was deleted, so that it can be synced with all current + future machines
I’d like to work on cleanup here, but my records.db with >120k lines of history (and a bunch of things that aren’t history) is still barely ~80mb.
Here is the process I used which cut my records.db on each machine down from 258MB to 60MB
# pick a primary node to start with
cd ~/.local/share/atuin
# set account_sync = false in ~/.config/atuin/config.toml on all nodes
# make a backup
cp history.db history.db.bak
atuin account delete
# clean up your history
## delete any entry that didnt exit 0 before a month ago
# atuin search -b "1 month ago" --exclude-exit 0 --delete-it-all
## remove duplicates older than x months
# atuin history dedup -b "3 months ago" --dupkeep 1
# verify you have a history size that you find acceptable
atuin history list | wc -l
# remove old session, key and records.db
rm records.db* key session
# create a new account
# use new username and email (plus addressed). fails if existing email
atuin account register
# verify. there will be the previous commands from above that are encrypted with an old key
atuin store verify
# purge the few old keyed entries
atuin store purge
# sync new records.db to server
atuin sync
# get your new key
atuin key
# set account_sync = true in ~/.config/atuin/config.toml the initial node
# on the other machines
cd ~/.local/share/atuin
atuin account logout
rm history.db* records.db* key session
atuin login
# clean up local records
atuin store verify
atuin store purge
# set account_sync = true in ~/.config/atuin/config.toml