Sean's Musings as a Service

Sean's Musings as a Service

Cleaning up your calibre library

  • Published:
  • categories: misc
  • tags: bash-scripting, unix

Just found an interesting thing, evidently Calibre does not cleanup old directories when you rename authors.

So I used some pretty standard *nix commands to help save the day here.

First find your empty directories

find calibre-library -type d -empty

If you are on Mac, like me, you will need to clear out your .DS_Store files (Don’t worry they will get rebuilt… ) Try it out to see what is it going to delete:

find calibre-library -name .DS_Store

Then run the command

find calibre-library -name .DS_Store -exec rm {} \;

Now you can find your empty dirs:

find calibre-library -type d -empty

Confirm that looks good, and run the removals.

find calibre-library -type d -empty -exec rmdir {} \;
Reference: