couchdb - deleting revision

You cannot delete an old revision of a single document. This is because the old revisions are only used by CouchDB internally for concurrency control and you shouldn't have to worry about these revisions.

If you want to remove all old revisions in order to shrink the size of your database, you can run compaction.


take care that it is not enough to delete the documents and their revisions with compaction, still some data is being saved in the db such as the last revision of the document.

In order to be 100% sure to delete all data you have to purge your db using this api:

POST /{db}/_purge

More on: http://docs.couchdb.org/en/1.6.1/api/database/misc.html

Tags:

Couchdb

Nosql