I want to factory reset IOS-XR. The router used is ASR9000

I'm used to do that easily in IOS doing config-register 0x2102, write erase followed by a reload.

I search on documentation, but found no explicit information. What is the correct method for doing a factory reset on the ASR9k running IOS-XR?

6 Answers 6


commit replace does the trick of nuking the config.

I found the commit history still shows the previous commits in a list, but you cant see the contents of them.


You must commit replace with an empty config file. This will wipe the config out completely. Also keep in mind the admin context. You'll need to go into the admin context and commit replace that config as well if you want to reset the settings inside the admin context.


To factory reset the ASR, I found the way here
We only need to apply this command

commit replace best-effort

As we don't have any configuration file target, actual configuration will be substitute with an empty file



To wipe existing config, and start from default configuration where you will be asked to set initial username and password for console connection you need just few commands:

ASR9010(admin-config)#commit replace

After this command just reload the device. This works very well for me on ASR9010


Sorry, that last post included a question because I saw an issue with all of the above techniques. The method given above does not take into account config rollbacks and log files. All places where identifiable data may be present. I was looking for a way I could blank the system for resale. A complete factory reset. These things use hard disks where information can be squirrelled away.

The only way I have found to completely clear the system information on an ASR9k RSP is to do a turbo boot. The process is documented on the TAC website, and involves loading a VM by TFTP or USB into ram from the rommon prompt. You need to be sure to tell it to format and clear the admin data. When it comes back, you will need to load the system modules you need, but it comes up like factory with setting the root user and password.

If you are looking for a clean RSP, that's the only way to do it. Otherwise, there is config all over the place in there.


For Classic XR (32-bit) if you are running version 6.5.3 with Rommon version 10.69, there is a command in Rommon mode which will do the wipeout of the HDDs.

rommon 2 > priv

You now have access to the full set of monitor commands. Warning: some commands will allow you to destroy your configuration and/or system images and could render the machine unbootable.

rommon 3 > hderase

SATA HD(0x4,0x0,0x0): Model : SMART SATA SHSLM32G3BCITHD22
Serial No : STP21299D3C

Secure Erase Supported
Security State : Disable/Not Locked/Not Frozen

All the contents on this Drive will be Erased Do you wish to continue?(Y/N)Y

Erasing SATA HD(0x4,0x0,0x0)... Erasing SATA HD(0x4,0x0,0x0) Completed

SATA HD(0x5,0x0,0x0): Model : SMART SATA SHSLM32G3BCITHD22
Serial No : STP21699CRP

Secure Erase Supported
Security State : Disable/Not Locked/Not Frozen

All the contents on this Drive will be Erased Do you wish to continue?(Y/N)Y

Erasing SATA HD(0x5,0x0,0x0)... Erasing SATA HD(0x5,0x0,0x0) Completed

rommon 4 >

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.