WordPress Version: 6.2
/**
* Deletes one existing category.
*
* @since 2.0.0
*
* @param int $cat_id Category term ID.
* @return bool|int|WP_Error Returns true if completes delete action; false if term doesn't exist;
* Zero on attempted deletion of default Category; WP_Error object is
* also a possibility.
*/
function wp_delete_category($cat_id)
{
return wp_delete_term($cat_id, 'category');
}