Remove_action inside a function

My guess is that it’s not working because the action name is 'wp_head', not 'wp-head'.

remove_action('wp_head',array($aiosp, 'wp_head'));