View Single Post
Old 07-27-2013, 04:40 AM   #20
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by BetterRed View Post
IIRC I used calibredb remove 1-100000, but the library only had ~120 books, and book-id high wouldn't have been more than 150 - might that have created a problem?
Just tried that. It tosses an exception trying to delete a UUID that isn't there. I have submitted a fix to Kovid.

That said, this method is very slow. It tries to delete each of the "books" in the range, failing for most of them. It would be better to get a list of IDs in the DB and delete those. However ...

I discovered that it wasn't possible to get calibredb to give you a list of only ids. I submitted a fix for that as well. Assuming Kovid accepts it, you will be able to say --fields="" to show only the ids. You would then take that output and feed it into calibredb remove, perhaps something like this on a *nix box
calibredb remove `calibredb list --fields=""`
chaley is offline   Reply With Quote