The proprietary cisco VTP protocol might be a good tool to manage a domain of switches. It does its work if one knows what is to be done and howto use it. But might be a nasty one if one want to get rid of it in the switch configuration.

Generally if a IOS switch gets into production again and one needs to erase all of the old configuration:

S1#write erase
S1#delete flash:vlan.dat

It is also a best practice if removing a switch from a productive network to put it aside as spare. Once it is powered on it is like a factory reset switch again.

However but how to remove a VTP domain name from running IOS configuration? The easy answer is, it is not possible, since there is no such command:

S1(confg))#no vtp ? 
  file       Configure IFS filesystem file where VTP configuration is stored.
  interface  Configure interface as the preferred source for the VTP IP updater address.
  mode       Configure VTP device mode
  password   Set the password for the VTP administrative domain
  pruning    Set the administrative domain to permit pruning
  version    Set the administrative domain to VTP version

But what to do one still wants to remove that ''vtp domain'' entry from a working configuration? With following steps it will work for sure.

Copy the running configuration to a TFTP/SCP server to be able to edit it in a external editor:

S1#copy run tftp://192.0.2.1/config/

Edit the configuration with you favourite editor and remove the unneeded ''vtp domain'' entry. In example below the vtp domain is called example.com:

user@host %  sed -i '/vtp domain example.com/d' switch_confg

At this point the corrected configuration has to be copied to the NVRAM ''startup-config'' on the target switch:

S1#copy tftp://192.0.2.1/config/switch_confg startup-config

Remove the vlan.dat file from flash:

S1#delete flash:vlan.dat

The VLAN configuration is stored in the config, and this file will be recreated once the switch has been restarted. Now the IOS swithc should be reloaded without writing further changes to the startup confiugration:

S1#reload

After the switch has been reloaded, the nasty VTP domain entry will not appear anymore in the configuration, verify with:

S1#sh vtp status
VTP Version capable             : 1 to 3
VTP version running             : 1
VTP Domain Name                 :
VTP Pruning Mode                : Disabled
VTP Traps Generation            : Enabled
Device ID                       : 001a.dead.beef
Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00

Feature VLAN:
--------------
VTP Operating Mode                : Transparent
Maximum VLANs supported locally   : 1005
Number of existing VLANs          : 12
Configuration Revision            : 0
MD5 digest                        : 0x1B 0x2A 0x30 0x4E 0x80 0x1E 0x4B 0x69
                                    0x4D 0x3D 0x2F 0xF7 0x4E 0xD9 0xED 0x18

This is the only way known to me to remove the VTP domain from a running configuration without resetting the switch to factory defaults. This will work IOS images but it should also work with IOS-XE.