Cleaning Calibre library “empty” directories

Lately I discovered many “empty” directories in the filesystem for my Calibre library, artifacts leftover from changing titles and authors of books. These weren’t deleted, it turns out, because I’d browsed to those folders in the finder at some point, leaving pesky .DS_Store files behind and Calibre was kind enough not to delete any directory having content it didn’t control.

Quick cleanup using the command line from within the library’s top folder:

find . -name .DS_Store -exec rm {} \;
find . -type d -empty -exec rmdir {} \;

Leave a Reply