atuin icon indicating copy to clipboard operation
atuin copied to clipboard

How to properly delete an entry?

Open iaeiou opened this issue 2 years ago • 5 comments

Hi there,

I'm trying to clean up some lines from Atuin history but failed so far.

Here is what I tried:

  • I installed sqlitebrowser
  • I opened the database from ~/.local/share/atuin/history.db
  • From the tab Browse Data, I've selected the table history
  • Some lines was successfully deleted, and the database saved

Unfortunately, these lines still appear when I hit Ctrl+R.

I suspected some cache or backup files, so I moved history.db-shm and history.db-wal and tried again. I also checked from a fresh terminal window.

These damned lines are still here..

Note that I didn't configure any synchronization.

What am I missing?

iaeiou avatar May 16 '22 06:05 iaeiou

could you try deleting them via the sqlite3 CLI?

like

delete from history where command = 'the command you want to delete';

ellie avatar May 16 '22 21:05 ellie

It works, but only partially:

the command still appears on the first screen, right after hitting Ctrl+R.

It does not appear anymore when the results are filtered (after hitting any keystroke, even if the filter corresponds to the string that appeared previously)

I ran the command you gave me and also checked the content of .bash_history.

iaeiou avatar May 17 '22 09:05 iaeiou

does it show up if you run

select * from history where command = 'the command you want to delete';

because otherwise I really can't see a way that it would still exist 🤔

ellie avatar May 17 '22 09:05 ellie

It does not appear in sqlite when I run

select * from history where command = 'the command you want to delete';

But still appears on the first screen of atuin when I hit Ctrl+R.. weird..

iaeiou avatar May 17 '22 17:05 iaeiou

Unfortunately I can't replicate the issue :(

Can you try running VACUUM after you delete?

another thing to try. does strings ~/.local/share/atuin/history.db contain your command, after you delete it + vaccuum?

ellie avatar May 20 '22 06:05 ellie

Closing as stale

ellie avatar Oct 08 '22 04:10 ellie