This article is first a reminder for myself. I hope someone of you reading will be needing this command as well, somewhere in time. So the command I have been searching for on an IOS platform is:

write erase

With the '''write erase''' command, the router is set to factory default setting (mostly). Some things still need to be removed manually, depending on the IOS platform, but generally '''write erase''' is sufficient enough for this kind of task. Setting the networking component into default setting. Using IOS-XR there is no '''write erase''' any more. This is achieved using the '''commit''' command in the (config) mode.

commit replace best-effort

Here how this looks in the CLI. This command needs to be executed in the configure mode:

RP/0/0/CPU0:R2(config)#commit ?
  best-effort   Commit the configuration changes via best-effort operation
  comment       Assign a comment to this commit
  confirmed     Rollback this commit unless there is a confirming commit
  force         Override the memory checks
  label         Assign a label to this commit
  replace       Replace the contents of running configuration
  save-running  Save running configuration to a file
  show-error    Displays commit failures immediately
  <cr>          Commit the configuration changes via pseudo-atomic operation

commit replace ?

RP/0/0/CPU0:R2(config)#commit replace ?
  best-effort   Commit the configuration changes via best-effort operation
  comment       Assign a comment to this commit
  confirmed     Rollback this commit unless there is a confirming commit
  force         Override the memory checks
  label         Assign a label to this commit
  save-running  Save running configuration to a file
  show-error    Displays commit failures immediately
  <cr>          Commit the configuration changes via pseudo-atomic operation



RP/0/0/CPU0:R2(config)#commit replace best-effort
Thu Mar 12 10:14:35.716 UTC

This commit will replace or remove the entire running configuration. This operation can be service affecting.
Do you wish to proceed? [no]: yes

With great power comes great responsibility.

Yes.