4

I often use Krunner to quickly access often used files. Lately I changed my storage partition mount point, from /storage/ to /mount/storage/, but Krunner didn't record the change. It stills provides me a link to the old location, making it useless.

How can I delete Krunner's history or cache?

3 Answers3

6
  • Launch KRunner and click on the highlighted icon

KRunner settings

  • In the new window that opens, click on Clear history

Clear KRunner history

Note that even these steps may not help KRunner see the new location because baloo, which KRunner depends on, doesn't index areas other than the user's home folder unless set to do so.

See https://community.kde.org/Baloo/Configuration in this regard.

It maybe possible to use the GUI provided by System Settings > Search to remove the desired location from the list of excluded items.

In the image below, a USB drive, "TOSHIBA EXT" is not being indexed.

Excluded device

Be prepared for some heavy CPU/RAM usage until the device is fully indexed!

DK Bose
  • 44,553
0

Only thing that worked for me was to remove the baloo index and lock files manually.

rm -f ~/.local/share/baloo/index*

Do not worry about the database getting deleted. Baloo will reindex the filesystem on next startup. Also you can run this command to reindex after deleting.

balooctl check
0

The file location for Distro: KDE neon 20.04 5.23 base: Ubuntu 20.04 LTS Focal:

/home/<username>/.local/share/krunnerstaterc

or

~/.local/share/krunnerstaterc

krunnerstaterc is a comma separated file.

For the specific case of the original post the following command would fix the issue:

sed -i 's/\/storage\//\/mount\/storage\//g' ~/.local/share/krunnerstaterc

For those using vim some useful commands:

Note: I prefer : over / in my substitute commands. If you are unfamiliar with vim, you must press : to get to the command line, then type the command (or paste with Ctrl+Shift+v).

:%s:,:,\r:g = Separate each item to a line.

:%s:/storage/:/mount/storage/:g = replace /storage/ with /mount/storage/ in entire file. (note: if you use / instead of : then replace / with \/ that's backslash slash without a space).

:g:search_term:d = delete entire line containing search_term.

:%s:,\n:,:g = Combine lines again. Do this last. then save and quit: :wq

Note: I used \r in the first command and \n in the last command. I'm not clear on the difference; it is just what worked for me.