By Edward Tetz

Removing a Smartport macro from a Cisco network interface is a little more complicated than applying it in the first place. Nevertheless, you can easily remove the macro from the switch. For example, to remove your macro,Awesome_Macro, from the switch, use the following command:

Switch1> enable
Switch1# configure terminal 
Switch1# no macro Awesome_Macro

The no macro Awesome_Macro command does not remove the macro configuration from the interfaces where it has already been applied, it only deletes the macro. To remove the commands from where they were applied, you can either reset the interface to the default configuration using a command such as default interface or create a reversal macro that has a no command for every macro command.

The latter option increases the number of macros that exist on the switch because you will have both a macro and a reversing macro but this allows you to be surgical in removing the macro configuration. Here you reset interface FastEthernet 0/4 to the default configuration.

Switch1> enable
Switch1# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Switch1(config)# default interface FastEthernet 0/4
Interface FastEthernet0/4 set to default configuration

To verify that the interface has been reset to the factory default configuration, use the show running-config.

Switch1> enable
Switch1# show running-config interface FastEthernet 0/4
Building configuration...
Current configuration : 33 bytes
interface FastEthernet0/4