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?
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.
Be prepared for some heavy CPU/RAM usage until the device is fully indexed!
Only thing that worked for me was to remove the baloo index and lock files manually.
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.
The file location for Distro: KDE neon 20.04 5.23 base: Ubuntu 20.04 LTS Focal:
or
krunnerstaterc
is a comma separated file.For the specific case of the original post the following command would fix the issue:
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.