IOS XR equivalent for ‘write erase’

The command is ‘commit replace’ without any configuration input. Basically you are replacing the configuration with a blank one.

RP/0/0/CPU0:XRV1#conf t
Thu Aug 31 14:28:21.504 UTC
RP/0/0/CPU0:IOS-XR(config)#commit replace
Thu Aug 31 14:38:52.441 UTC

This commit will replace or remove the entire running configuration. This operation can be service affecting.
Do you wish to proceed? [no]: yes
RP/0/0/CPU0:Aug 31 14:38:57.630 : ifmgr[228]: %PKT_INFRA-LINK-3-UPDOWN : Interface GigabitEthernet0/0/0/2, changed state to Down
RP/0/0/CPU0:Aug 31 14:38:57.630 : ifmgr[228]: %PKT_INFRA-LINK-3-UPDOWN : Interface GigabitEthernet0/0/0/0, changed state to Down
RP/0/0/CPU0:Aug 31 14:38:57.630 : ifmgr[228]: %PKT_INFRA-LINK-3-UPDOWN : Interface MgmtEth0/0/CPU0/0, changed state to Down
RP/0/0/CPU0:Aug 31 14:38:57.670 : ifmgr[228]: %PKT_INFRA-LINK-3-UPDOWN : Interface GigabitEthernet0/0/0/2, changed state to Up
RP/0/0/CPU0:Aug 31 14:38:57.670 : ifmgr[228]: %PKT_INFRA-LINK-3-UPDOWN : Interface GigabitEthernet0/0/0/0, changed state to Up
RP/0/0/CPU0:Aug 31 14:38:57.670 : ifmgr[228]: %PKT_INFRA-LINK-3-UPDOWN : Interface MgmtEth0/0/CPU0/0, changed state to Up
RP/0/0/CPU0:ios(config)#
RP/0/0/CPU0:ios(config)#
RP/0/0/CPU0:ios(config)#sh run
Thu Aug 31 14:39:22.419 UTC
Building configuration...
!! IOS XR Configuration 6.1.3
!! Last configuration change at Thu Aug 31 14:38:57 2023 by admin
!
end

RP/0/0/CPU0:ios(config)#

Leave a Comment