<@U04UQ68083H> is there a way to delete an identit...
# ory-copilot
b
@chilly-king-10285 is there a way to delete an identity schema?
c
A message from kapa.ai
No, identity schemas in Ory are immutable to prevent inconsistencies in the data. This means that you cannot delete or update an existing schema. However, you can use the existing schema as a template to create a new schema. It's recommended to manage identity schemas in version control. For more information, you can refer to the [Ory documentation on managing identity schemas](https://www.ory.sh/docs/identities/model/manage-identity-schema#update-identity-schemas).
b
@chilly-king-10285 can i at least disable a shcema
c
A message from kapa.ai
The Ory documentation does not provide information on disabling an identity schema. However, you can change the active schema for your project. This means you can switch from one schema to another, effectively "disabling" the use of the previous schema for new identities. Here's how you can change the active schema: 1. Go to User managementIdentity schema in the [Ory Console](https://console.ory.sh/projects/current/identity-schema). 2. From the Active schema drop down, select the schema you want to use. 3. Click the Change active schema button to apply the schema to your project. Please note that changing the active schema will affect all new identities created in the project. Existing identities might not be able to sign in, for example if you change from an email based schema, to a username based schema. For more information, you can refer to the [Ory documentation on managing identity schemas](https://www.ory.sh/docs/identities/model/manage-identity-schema).
b
@chilly-king-10285 I accidentally created a faulty schema, that no identity ever used and it will not be ever used. Are you telling me that I am stuck with it?
c
A message from kapa.ai
I understand your concern. However, based on the information provided in the Ory documentation, it appears that once an identity schema is created, it cannot be deleted or directly disabled. Identity schemas are designed to be immutable to prevent inconsistencies in the data. While the schema will remain in your list of schemas, you can ensure it's not used by not assigning it to any new identities. You can control which schema is used by new identities by setting the
default_schema_id
in your configuration. Here's an example of how you can set the `default_schema_id`:
Copy code
yaml identity:     default_schema_id: user_v1     schemas:       - id: user_v0         url: base64://{b46-encoded-user_v0}       - id: user_v1         url: base64://{b46-encoded-user_v1}
In this example,
user_v1
is the default schema that will be used for new identities. The
user_v0
schema will not be used unless explicitly assigned to an identity. For more information, you can refer to the [Ory documentation on managing identity schemas](https://www.ory.sh/docs/identities/model/manage-identity-schema#update-identity-schemas).