write erase
Erases the startup configuration from NVRAM, resetting the device to factory defaults on next reload.
write eraseWhen to Use This Command
- Preparing a router for redeployment in a different network environment.
- Clearing a misconfigured device before applying a new configuration.
- Returning a device to a known clean state for troubleshooting.
- Removing all configuration before returning leased equipment.
Command Examples
Basic write erase
write eraseErasing the nvram filesystem will remove all configuration files! Continue? [confirm] [OK] Erase of nvram: complete
The command prompts for confirmation; pressing Enter confirms. The output confirms the NVRAM filesystem has been erased successfully.
Alternative command with reload
write erase
reloadErasing the nvram filesystem will remove all configuration files! Continue? [confirm] [OK] Erase of nvram: complete Proceed with reload? [confirm] %SYS-5-RELOAD: Reload requested
After erasing, the reload command reboots the device. The device will load the default factory configuration.
Understanding the Output
The output begins with a warning that all configuration files will be removed and prompts for confirmation. Typing 'yes' or pressing Enter proceeds. '[OK]' indicates the erase operation succeeded. 'Erase of nvram: complete' confirms the NVRAM filesystem is now empty. After this, the device still runs the current running configuration until reloaded. A subsequent 'reload' command will reboot the device, which then boots with no startup configuration, prompting the initial configuration dialog or entering setup mode.
CCNA Exam Tips
CCNA exam tip: 'write erase' is equivalent to 'erase startup-config' — both remove the startup configuration from NVRAM.
CCNA exam tip: The command does not affect the running configuration; a reload is required to clear the running config.
CCNA exam tip: You must be in privileged EXEC mode (enable) to use this command.
CCNA exam tip: After 'write erase', the device will prompt for initial configuration on next reload; this is a common scenario for password recovery.
Common Mistakes
Mistake 1: Forgetting to reload after 'write erase' — the running configuration remains active until reboot.
Mistake 2: Confusing 'write erase' with 'write memory' — 'write memory' saves the running config to startup, while 'write erase' deletes it.
Mistake 3: Not confirming the prompt — the command requires confirmation; simply pressing Enter is sufficient.
Related Commands
erase startup-config
Deletes the startup configuration file from NVRAM, causing the router to load with factory defaults on next reload.
reload
The reload command reboots a Cisco IOS device, typically used to apply configuration changes or recover from a system issue.
show startup-config
Displays the saved configuration stored in NVRAM that loads on next device boot.
write memory
Saves the current running configuration to the startup configuration in NVRAM, ensuring changes persist after a reload.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions