How can I delete PouchDB Database indefinitly, to free space?

database, javascript, pouchdb

Solution

It sounds like you are looking for compaction. It will do exactly what you describe. :)

Problem

How can I drop a database in PouchDB to get the space on the disk free again? Remove only sets a paramter _deleted and keeps the Data of the record anyway. But how can I delete records in a way that actually gets rid of them and saves up some space? Because I'd like to reset the database every now and then so it doesn't get too big.

Original source