Cisco "write erase" Command Explained
write erase — deletes the startup configuration from NVRAM — used to factory-reset a device's saved config, most often before decommissioning or repurposing hardware. Runs in privileged EXEC mode.
Syntax and common variants
| Variant | Purpose |
|---|---|
write erase (or erase startup-config) | Delete the saved configuration |
reload | Required afterward to actually clear the running config too |
Reading the output
| Output / element | Meaning |
|---|---|
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm] | A safety prompt — confirm carefully |
[OK] Erase of nvram: complete | Startup-config successfully wiped |
When to use it
A genuinely destructive command — reserved for decommissioning, returning leased/loaner equipment, or deliberately factory-resetting a device. It only clears startup-config; the running-config in memory still holds until a reload wipes it too. Always double-check you're on the intended device before confirming. Browse more in the command reference or practise in the free labs.
Frequently asked questions
Does write erase clear the running configuration immediately?
No — it deletes startup-config in NVRAM. The running configuration in memory remains active until a reload, which then boots with no saved config.
When would you use write erase?
Before decommissioning a device, returning leased equipment, or intentionally factory-resetting a device to a clean state.
Is write erase reversible?
No — once confirmed and followed by a reload, the previous configuration is gone unless you have an external backup (see the TFTP backup lab).
Related articles
Want hands-on training?
Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.