There are many articles on the subject, how to remove one alias, but no data about how to remove ALL aliases from ALL accounts.
This little script will help you when you need to move to another O365 tenant or from cloud to on premises Exchange.
$alias = Get-Mailbox -resultsize unlimited
foreach($x in $alias)
$x.emailaddresses = $x.userprincipalname
Set-mailbox $x.alias -emailaddresses $x.emailaddresses