.png)
To completely clear all bibliographic data from Koha LMS, you need to ensure that all bibliographic records (biblio and biblioitems tables) are deleted from the database. If you have already used Batch Record Deletion, but records are still appearing in search results, follow these steps to fully remove them:Check Koha instance name: Run this command in the terminal: sudo koha-list
eg: root@pciet-library-To-Be-Filled-By-O-E-M:/home/pciet-library# sudo koha-list
library
Here Koha instance name is: library
1️⃣ Delete all bibliographic data from MySQL
sudo mysql -uroot -p
Then, inside MySQL:
USE koha_library;
DELETE FROM items;
DELETE FROM biblioitems;
DELETE FROM biblio;
DELETE FROM deleteditems;
DELETE FROM deletedbiblioitems;
DELETE FROM deletedbiblio;
EXIT;
2️⃣ Rebuild the Search Index - For Zebra:
sudo koha-rebuild-zebra -v -f library
3️⃣ Restart Koha Services
sudo systemctl restart koha-common
4️⃣ Verify That Records Are Deleted
Check the Koha staff interface and OPAC to confirm deletion.
If old records still appear, restart the server:
sudo reboot
✅ Fix: Completely Clear and Rebuild Koha's Search Index
If the issue is with indexing, follow these steps to fully reset it.
1️⃣ Stop Koha Services
sudo systemctl stop koha-common
2️⃣ Delete Old Zebra or Elasticsearch Index
sudo rm -rf /var/lib/koha/library/biblios/*
sudo rm -rf /var/lib/koha/library/authorities/*
3️⃣ Rebuild the Index
sudo koha-rebuild-zebra -v -f library
4️⃣ Restart Koha Services
sudo systemctl start koha-common
5️⃣ Clear Cache (Optional)
sudo rm -rf /var/cache/koha/library/*
Then restart the server:
sudo reboot
Now, try searching in the Koha staff interface and OPAC.
The records should be completely removed.