taxonomy – update_term_meta not working

Question

I am trying to remove a string off of a bunch of CPT taxonomy slugs that were added and need to get removed.

I’m trying to use update_term_meta and it appears to be working when I error log the result however it does not appear to have worked when I view the terms through the dashboard?

I can’t figure out what I’m doing wrong here?

function remove_stuff() {
$terms = get_terms( array( 'taxonomy' => 'experts_industries', 'hide_empty' => false, ) ); foreach($terms as $term) { update_term_meta($term->id, 'experts_industries', array('slug' => str_replace('-expert-witnesses', '' , $term->slug) )); error_log($term->slug);

}
}