HOWTO delete / default an interface on a Cisco switch

Say for instance you'd like to clear a configuration like this from a Cisco switch:

interface GigabitEthernet4/28
 description AIX image server
 switchport access vlan 1678
 switchport mode access
 no cdp enable
 spanning-tree portfast
end

The hard way is naturally to do it the no, no… no, no no, no…, no, no no, no… no, no there's no… and yet more no way!

The simple solution is once you're on the switch:

Conf t

def int g4/28 <-- This will set the interface in default mode - Neat eh ?

No more no no…

 
<!-- AddThis Button BEGIN -->
<a class="addthis_button" href="http://addthis.com/bookmark.php?v=250&amp;username=xa-4beeaaab61b514bf"><img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4beeaaab61b514bf"></script>
<!-- AddThis Button END -->
<br>
<br>

Share this knowledge with your friends!