
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeGood question! When you remove a field from your Sanity schema, the existing data in documents that have that field will not be automatically deleted. This is actually a feature designed to prevent unintended data loss.
The data remains in your documents in the Content Lake. Sanity treats schema changes as non-destructive by default - changing your schema doesn't cascade changes to existing content. This helps prevent breakage for applications that might still rely on that data.
Mark the field as deprecated first (optional but recommended for production projects)
You can use the deprecated property in your schema to mark fields that shouldn't be used anymore:
defineField({
name: 'oldFieldName',
type: 'string',
deprecated: {
reason: 'This field is no longer used'
},
readOnly: true // prevents further edits
})Decide if you need to clean up the data
You have a few options:
sanity documents validate CLI command to check which documents still have that fieldRun a migration to remove the data (if needed)
If you want to actually remove the field data from existing documents, you can create a migration script using sanity migration create and use the unset() helper function.
The main documentation page you want is: Migrating your schema and content
Also helpful:
The short version: you're safe to remove the field from your schema without worrying about data loss. The old data will just sit there harmlessly unless you explicitly remove it with a migration.
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