Home‎ > ‎Juniper‎ > ‎Starting off‎ > ‎

Virginising the device

There are two ways to clear the configs on a JunOS box.  


the simplest way to clear the configs on a JunOS box, is to use the load factory-default command.  This replaces the current configs with the origional ones that were shipped with the device.  

root@fw# load factory-default
warning: activating factory configuration


You will need to reset the root password before you can commit the changes though.  


If you need to clear everything from the box including all log files and the like, then you should use the zeroize command.  (This is good if equipment is leaving your ownership.)

root@fw> request system zeroize
warning: System will be rebooted and may not boot without configuration
Erase all data, including configuration and log files? [yes,no] (no) yes

warning: zeroizing re0


Note that the format of this command might be different depending on the FIPS status of your system.  You can confirm the correct context with the command: 
root@fw> help apropos zeroize
request system zeroize
    Erase all data, including configuration and log files

Save changes and restart: 

Make sure the changes you entered were good, then view them, and then save
commit check
show | compare
commit and-quit

Then restart the device: 
root@fw> request system reboot 

SRX Default user and password: 

The default user is root, and at first, you do not need to enter a password
Amnesiac (ttyu0)

login: root

--- JUNOS 12.1X44-D40.2 built 2014-08-28 12:20:14 UTC