Join live – Get insights, tips, + Q&A from Sanity developers on our latest releases

How to Delete Multiple Documents in Sanity

1 replies
Last updated: Jun 9, 2020
How to delete multiple documents?
Jun 8, 2020, 8:07 PM
Answered in DM but leaving this here in case others are looking. You can delete multiple documents one by one by running the following command:
sanity documents delete <docId>

Alternatively, you can run a script to remove a batch of up to 1k documents at the same time, but be sure to make a dataset export/backup before 
Jun 9, 2020, 9:44 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?