How to clear config from a Cisco Catalyst 3750 port

Posted on 2009-12-29
Last Modified: 2012-05-08
Is there a command that can be run to clear the configuration off a switch port on a Cisco Catalyst 3750?

I know that you can go and use the "no" command to remove the configuration line by line. I would like to use a single command to remove all the lines of configuration.
Take a look at the port configuration below. This is a typical configuration for each one of our ports. You can see why using the "no" command is time consuming.

interface FastEthernet1/0/1
 switchport access vlan 100
 switchport mode access
 switchport voice vlan 101
 switchport port-security maximum 3
 switchport port-security aging time 2
 switchport port-security violation restrict
 switchport port-security aging type inactivity
 srr-queue bandwidth share 10 10 60 20
 srr-queue bandwidth shape  10  0  0  0
 mls qos trust device cisco-phone
 mls qos trust cos
 macro description cisco-phone
 auto qos voip cisco-phone
 dot1x pae authenticator
 dot1x timeout quiet-period 3
 dot1x timeout tx-period 15
 dot1x guest-vlan 106
 dot1x auth-fail vlan 106
 spanning-tree portfast
 spanning-tree bpduguard enable
Question by:Dumas
    LVL 8

    Accepted Solution

    config t
    default interface fa1/0/1
    LVL 16

    Expert Comment


    #write erase


    when this appears
    Would you like to enter the initial configuration dialog? [yes/no]:n

    type n

    have fun

    LVL 8

    Expert Comment

    Wow, MEMO, you really want him to swat a fly with a cadillac don't ya?  

    I came back here to update you and tell you that it works with the interface range as well.  

    config t
    default interface range fa1/0/1 -2
    LVL 16

    Expert Comment

    wait a second
    may im not understanding your question?
    are you trying to erase only configuration for that port ??
    if yes
    then my post is not fit your need
    it erase your configurations

    LVL 16

    Expert Comment

    you are totally right ccie22921:

    i apology for that ,, i thought clear all configurations ..


    Author Closing Comment


    You dont know how much time this is going to save me.
    Thank you!

    Author Comment

    Thanks for the laugh Memo.
    When I read your first reply, I thought you were just being witty.
    Good thing I knew what that command did.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    This tutorial will go through the steps required to write a script that will back up the configuration settings of a HP-ProCurve switch. You will need to get the following things to follow this tutorial: Telnet Scripting Tool e.g. TST10.exe …
    Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
    After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now