
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeThis is a common issue in Sanity! You're getting this error because the Home and About pages you're trying to delete are referenced by other documents in your content. Sanity prevents you from deleting documents that have strong references pointing to them - this is a security feature that protects your content integrity.
The easiest way to find what's referencing your pages is to use Vision (Sanity's GROQ playground):
/vision)*[references("YOUR_DOCUMENT_ID")]Replace YOUR_DOCUMENT_ID with the actual _id of your Home or About page. You can find the document ID by opening the document in Studio and checking the "Inspect" panel.
Alternatively, you can use this more detailed query that shows you which documents have references:
*[]{_id, title, "references": *[references(^._id)]}[length(references) > 0]This will show you all documents and what's referencing them.
Once you know which documents are referencing your pages, you have several options:
Based on discussions in the Sanity community, common places where references hide include:
If you want to allow deletion even when references exist, you can modify your schema to use weak references:
{
name: 'pageReference',
type: 'reference',
weak: true, // This allows the referenced document to be deleted
to: [{type: 'page'}]
}With weak references, Sanity won't block deletion - though the referencing documents will have broken links.
The Vision query is your best tool here for tracking down exactly what's holding onto those references. Once you clean those up, you'll be able to delete the Home and About pages without issues!
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
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