Clear switch configuration

Solved
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

  1. 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
    1. Thank you for your response.

      So an "erase nvram:" followed by "copy st ru" has the same effect?
      0
    2. @brupalaah 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