What are metadata.calibre and driveinfo.calibre on my e-reader?
Both files come from calibre, the ebook manager, and they're there because at some point you plugged the reader into a computer running it. metadata.calibre is calibre's list of the books it found on the device, kept so that it doesn't have to scan every book again at the next connection. driveinfo.calibre holds the ID that calibre gives that storage, and says whether it's the reader's own memory or a memory card. Neither is for the reader: a 2011 forum answer called the list “only a cache for Calibre”. Delete them and your books stay where they are. calibre makes a new metadata.calibre when it scans the device again (Goyal, 2021: “let calibre rebuild it”).
metadata.calibre
Kovid Goyal, who created calibre, described it on MobileRead as the file “which caches the results of previous scans” (2014). It sits at the root of the storage, next to the folders of books, and a reader with a memory card can have one on each. It has one entry for each book: the path of the file on the device, calibre's uuid and ID for the book, the title, the authors, and more. A user who opened his in 2021, after calibre showed none of his books as on the device, found entries with the authors and the timestamp left blank. Goyal's advice in that thread was to “Delete the metadata.calibre file and let calibre rebuild it.”
That's the usual cure when calibre's view of the device has gone wrong: books that it lists as missing, or files it shouldn't list at all. In the 2014 thread the trouble was a phone whose scanned folders had changed. The deletion worked once the owner had also taken the unwanted folder out of the scan settings. The cost of deleting the file is a full scan: calibre has to read the device again before the list is back, and a forum member in the 2021 thread warned against touching the files that calibre writes to the root unless you want “to do a full scan again”.
On at least one reader the file once showed up as a book. In 2010 an owner of an Onyx Boox 60 reported that metadata.calibre appeared in the reader's book list, and that a full stop in front of the name hid it. Goyal offered to change the name that the driver writes, said it would be in the next release, and told users to delete the old file by hand after upgrading.
driveinfo.calibre
Each storage of a device gets its own driveinfo.calibre, in its root folder. In a 2020 thread on calibre's MobileRead forum, the forum member chaley explained that the unique ID calibre gives a storage is kept in this file. calibre's template reference confirms that each storage location “has its own device name” and a different uuid, under the keys main, carda and cardb. The file also records a location code, which on a Kobo is main for the device's memory and A for the card.
When to delete them
When calibre reports an error communicating with the device, Goyal's steps start with a restart of both the reader and the computer. If that fails, the next step is to find driveinfo.calibre and metadata.calibre on the device and delete them, and after that to reset the device (2023). He gave the same steps to an owner of a Kindle Fire HD 10 in 2019. Finder, Windows Explorer, or a file manager on the device can delete them.
If you've stopped using calibre, there's no need to delete them. If you sync a Kobo with Readwyn, there's a reason to keep them. Readwyn, the Mac and Linux ebook library app behind this blog, reads metadata.calibre on a Kobo to tell which book on the device is which book in your library. When you import a calibre library, Readwyn keeps each book's calibre uuid, and the list on the Kobo links that uuid to a file path, so books that calibre sent match exactly. Without the files, a book that Readwyn hasn't matched in an earlier sync is matched by its title, and also by its first author if your library has more than one book with that title (how that sync works). The Kobo's own data lives somewhere else, in the hidden .kobo folder.