Resetting a Cisco switch to factory defaults requires erasing the startup configuration and deleting the vlan.dat file from flash memory. Both steps are necessary to ensure no previous settings persist after a reload.
Factory Reset Switch
Let's say I want to now completely start fresh. I want to wipe everything out and start with an all fresh switch, with none of the configurations.
One of the obvious things that I need to do is erase the startup config, so: erase startup config. I'm going to erase this, and this is going to wipe that file out. So I hit there, it says are you sure, and yes I do, and so now it is complete.
Now I would think at this point in time that if I did a reload, my switch would come up and there wouldn't be any configurations to it. However, I do actually have an extra file on here. Later on we're going to be getting into VLANs, and when we start covering VLANs there is going to be an extra file that's going to be created. So if I do a show flash on here, I can see that on this switch I actually do have this vlan.dat. If I were to restart this, that file would still exist.
So if I truly want to start with a fresh slate and not have anything on this switch programmed at all, I need to remove that. I do that by typing in delete vlan.dat. It's going to confirm, am I sure that I want to do that? Yes. And confirm. And then it is removed.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →