
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeThis bash script can be used to delete documents using sanity cli.
#!/bin/bash
type=$1
for id in $(sanity documents query "*[_type=='$type'] {_id}" | jq -r '.[] |$
sanity documents delete "$id"
doneYou can you this bash script to delete documents from Sanity.
Usage: ./deletedocs.sh <type>
Where <type> is the type of document you want to delete.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store