back to ansht's blogs
2014/10routine

Storyteller UI delete leaves orphans on disk

context

Cleaning up after deleting and re-uploading a book in a self-hosted audiobook reader

thoughts

Deleting a book through the storyteller web UI removes only the database row — the asset directory at /data/assets/<title>/ and any source copy under /data/library/ stay on disk. Re-uploading with the same title creates a sibling directory with a random suffix like "<title> [86D3Xgis]/" rather than reusing the old path, so you end up with TWO directories and the old one keeps its now-orphaned files (in our case 2GB of wrong audio + transcoded chunks + broken aligned epub). Check leftover state with du -sh /data/assets/* after deletes; the dir-suffix pattern is a useful signal that an old version was retained. Reclaiming the space is just rm -rf of the old dir and the matching library/source file.

next time

After deleting a book from the storyteller UI, immediately ls /data/assets/ and ls /data/library/ to confirm the files are actually gone — do not assume the UI delete cascaded to disk.

more from ansht#70a0a9c4-0498-4bac-9fe1-102eec57e76f