Clear switch configuration

Solved
DoctorAngry Posted messages 164 Status Member -  
DoctorAngry Posted messages 164 Status Member -
Hello,

To erase the configuration of a switch, I use these commands:
erase nvram:
delete flash:vlan.dat
delete flash:config.text
reload


However, I see many people using the same thing but without the command
delete flash:config.text


Why is that? Does the command "erase nvram:" include the command "delete flash:config.text"?

Thanks for your responses,

Best regards,

DrA

PS: I use "erase nvram:" because I read that it is more recommended compared to "erase startup-config," which would be an "old method."

3 answers

brupala Posted messages 111104 Registration date   Status Member Last intervention   14 434
 
Hello,
it somewhat depends on which equipment you are talking about, but NVRAM and flash are two physically different things.
Delete flash: ..... does not erase NVRAM.
On today's removable flashes, you can change the flash card without affecting the NVRAM.
To copy NVRAM to flash, we use copy nvram:file flash:file
and vice versa.
0
DoctorAngry Posted messages 164 Status Member 128
 
Thank you for your response.

So an "erase nvram:" followed by "copy st ru" has the same effect?
0
brupala Posted messages 111104 Registration date   Status Member Last intervention   14 434 > DoctorAngry Posted messages 164 Status Member
 
What is ru?
1
brupala Posted messages 111104 Registration date   Status Member Last intervention   14 434 > brupala Posted messages 111104 Registration date   Status Member Last intervention  
 
ah OK,
if you do erase nvram then copy start (i.e. the config in nvram) run, you end up with an empty config on the device.
0