How do I stop and remove KDE Baloo that is broken and filling up my syslog file?

KDE baloo has recently caused rsyslog to start logging many errors.

Part of 'Syslog'

Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PositionDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid
Mar  3 15:01:53 harry-S340 baloo_file.desktop[2982]: org.kde.baloo.engine: PostingDB::put MDB_BAD_TXN: Transaction must abort, has a child, or is invalid

It caused my /var/log/syslog to grow exponentially, it filled the disk once already, I've since disabled rsyslog to stop this from destroying my SSD and making Ubuntu unusable but I don't know what Baloo is or how to stop and uninstall it. When i fist noticed this /var/log/syslog had grown to 66GB causing my disk to be FULL. I was able to delete it and log back in and disable rsyslog through recovery mode. Running rsyslog for one second caused it to go up to 75MB.

'Neofetch --off' result

OS: Ubuntu 19.10 x86_64 
Host: 81NC Lenovo IdeaPad S340-15API 
Kernel: 5.3.0-40-generic 
Uptime: 11 mins 
Packages: 3040 (dpkg), 38 (snap) 
Shell: bash 5.0.3 
Resolution: 1920x1080 
DE: GNOME 
WM: Mutter 
WM Theme: Adwaita 
Theme: Yaru-dark [GTK2/3] 
Icons: Yaru [GTK2/3] 
Terminal: gnome-terminal 
CPU: AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx (8) @ 2.100GHz 
GPU: AMD ATI 04:00.0 Picasso 
Memory: 2756MiB / 5945MiB 

I don't want to uninstall the whole of KDE straight away but if that is the only way to get rid of this broken program then I happily will.

Other commands

harry@harry-S340:~$ whereis baloo
baloo:
harry@harry-S340:~$ sudo apt-get autoremove baloo
[sudo] password for harry: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'baloo' is not installed, so not removed
0 to upgrade, 0 to newly install, 0 to remove and 4 not to upgrade.
harry@harry-S340:~$ whereis baloo_file
baloo_file: /usr/bin/baloo_file
harry@harry-S340:~$ sudo apt-get autoremove baloo_file
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package baloo_file
harry@harry-S340:~$ sudo systemctl status baloo_file
Unit baloo_file.service could not be found.

Pressing tab to see all the commands that have baloo in them:

harry@harry-S340:~$ baloo
balooctl                           baloo_filemetadata_temp_extractor
baloo_file                         baloosearch
baloo_file_extractor               balooshow

these all don't have any manuals

harry@harry-S340:~$ man baloo
No manual entry for baloo
harry@harry-S340:~$ man baloo_file
No manual entry for baloo_file
harry@harry-S340:~$ man balooctl
No manual entry for balooctl
harry@harry-S340:~$ man baloosearch
No manual entry for baloosearch
harry@harry-S340:~$ man balooshow
No manual entry for balooshow
harry@harry-S340:~$ man baloo_filemetadata_temp_extractor
No manual entry for baloo_filemetadata_temp_extractor
harry@harry-S340:~$ man baloo_file_extractor
No manual entry for baloo_file_extractor

Desktop file mentioned in syslog

[Desktop Entry]
Type=Application
Exec=baloo_file
X-KDE-StartupNotify=false
X-KDE-autostart-condition=baloofilerc:Basic Settings:Indexing-Enabled:true
X-KDE-autostart-phase=0
X-GNOME-Autostart-enabled=true
OnlyShowIn=KDE;GNOME;Unity;XFCE
NoDisplay=true

Requests

Balooctl status

harry@harry-S340:~$ balooctl status
Baloo File Indexer is running
Indexer state: Indexing file content
Total files indexed: 109,311
Files waiting for content indexing: 3
Files failed to index: 4
Current size of index is 507.65 MiB
harry@harry-S340:~$ sudo balooctl disable
[sudo] password for harry: 
Disabling and stopping the File Indexer

this stopped rsyslog filling up /var/log/syslog.

Thanks, Harry


Here is how I removed baloo

balooctl disable                  # stops the service
sudo apt install -s dolphin       # where to find baloo
sudo apt remove --purge libkf5balooengine5
rm -rf .local/share/baloo/        # removes the index files; they can be several GB

There are some related answers at Baloo creates 64GB index, takes half my memory and 25% CPU


For me, it just helped to disable content indexing like this:

balooctl config set contentIndexing no

This way, baloo should quickly make the index just for file names, so you can still search for file names in Dolphin.


I need to keep baloo, this corrected the syslog debugging issue, so I ran the following with success:

balooctl disable && balooctl purge && balooctl enable

Checking Status with balooctl status I get:

Baloo File Indexer is running
Indexer state: Idle
Total files indexed: 1,287
Files waiting for content indexing: 0
Files failed to index: 0
Current size of index is 16.04 MiB

Everything is now fine, disabling, purging, re-enabling the service keeps monitoring syslog in case