Programmatically remove a field

Public

Get raw version
php
  1. function hook_update_N(&$sandbox) {
  2. field_delete_field($field_name);
  3. field_delete_instance(field_info_instance($entity_type, $field_name, $bundle_name));
  4. }