Code:
calibre-debug -c "from calibre.library.database import LibraryDatabase; db = LibraryDatabase('library1.db'); db.refresh('title', True); import pprint; pprint.pprint(db.data)"
replace library1.db witht he full path to library1.db
This will print out all the books in the database with their id numbers. Once you have the id number for the problem book:
Code:
calibre-debug -c "from calibre.library.database import LibraryDatabase; db = LibraryDatabase('library1.db'); db.refresh('title', True); db.delete_book(id)"