I have upgraded a website to drupal 8 that I found a field created and I need to delete that field as it became useless. The field is locked, and this prevents me delete it from the interface. I tried to delete it using [`field_purge_field()`][1], but it didn't work either. The answer for http://drupal.stackexchange.com/questions/177156/how-to-properly-delete-fields-programmatically didn't work for me. **Edit**: I tried that piece of code but didn't do any thing $field = \Drupal::entityManager()->getStorage('field_config')->load($entity_type.$bundle_name.$field_machine_name); field_purge_field($field); How do I delete fields that result locked? How do I unlock them before deleting them? [1]: https://api.drupal.org/api/drupal/core%21modules%21field%21field.purge.inc/function/field_purge_field/8.2.x