Skip to content

Instantly share code, notes, and snippets.

@ozh
Last active March 10, 2024 11:39
Show Gist options
  • Save ozh/4968d6054b5ca83ec0e2d385c7edc51e to your computer and use it in GitHub Desktop.
Save ozh/4968d6054b5ca83ec0e2d385c7edc51e to your computer and use it in GitHub Desktop.
Remove read books on kobo reader from the command line

Shell in the kobo, from the root :

sqlite3 -header .kobo/KoboReader.sqlite "SELECT ContentID FROM content WHERE BookTitle is null and ReadStatus = 2 ORDER BY Title;" | grep epub | sed 's!file:///mnt/onboard/!!' | while read f; do rm -f "$f"; done

@ozh
Copy link
Author

ozh commented Jul 12, 2022

To list before removal :

sqlite3 -header .kobo/KoboReader.sqlite "SELECT ContentID FROM content WHERE BookTitle is null and ReadStatus = 2 ORDER BY Title;" | grep epub | sed 's!file:///mnt/onboard/!!' | while read f; do echo "-> $f"; done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment