Thanks for reaching here! If I have understood right you want to remove your assigned custom domain name if so you may refer to below steps:
Using Azure portal:
If your hostname has SSL bindings you first need to remove that then delete the hostname.
Go to web app -> Custom Domains -> App Service Domains -> Click on the domain -> Delete it.
Use below PowerShell script to Remove all custom domain:
$webApp = Get-AzWebApp -ResourceGroupName "<Resource-Group-Name>" -Name "<App-Name>";
$webApp.HostNames.Clear();
$webApp.Hostnames.Add($webApp.DefaultHostName);
Set-AzWebApp `
-ResourceGroupName "<Resource-Group-Name>" `
-Name <App-Name> `
-HostNames $webApp.HostNames;
This will remove all custom hostnames and leave only the default one.
If you want to remove a specific hostname for the collection you could use:
$webApp.HostNames.Remove("your_hostname_goes_here")
Please let us know if further query or issue remains.