This is my follow-up to my original article on setting a Netscaler back to factory defaults (http://www.jasonsamuel.com/2010/06/22/how-to-reset-a-citrix-netscaler-back-to-factory-defaults/). The instructions I provided wiped the config but what about if your actual Netscaler system is corrupted and you need to bring it back to factory new conditions? Well here is the procedure which is also outlined here on CTX116742 (http://support.citrix.com/article/CTX116742). ZebOS by the way if you are interested is what does the routing on the Netscaler (http://www.ipinfusion.com/products/products_home.html). This is a commercial version of GNU Zebra (http://www.zebra.org). Development on Zebra stopped back in 2005 and Quagga became the successor (http://www.quagga.net). A lot of network appliances out there are based on these two.
1. After completing the following steps, the NetScaler will have no configuration left and will be ready for the next installation or environment. Connect to the device using the serial console or with a Secure Shell client (SSH). Delete the system, routing, and SSL configuration:
# cd /etc
# for file in *; do
# rm /nsconfig/$file 2> /dev/null
(Ignore warnings about files or directories missing. Not all files in /nsconfig are present in /etc)
# cd /nsconfig
# rm ns.conf* ZebOS.conf rc.conf
(Ignore warnings about files or directories missing)
# cd ssl
# rm *
2. Perform an initial system configuration. Connect to the device using the serial console:
> set ns config –ipaddresss nsip -netmask netmask
> save config
July 3, 2010 at 3:09 PM
This helped me fix a routing issue with an older Netscaler. Thanks for posting this.
July 3, 2010 at 3:23 PM
December 28, 2016 at 8:56 PM
this is old news – does it still work on newer firmware?
Has anyone tested it on NS 11?
March 3, 2017 at 4:30 AM
Thank you for this, I mis-typed the gateway when doing initial config of a Netscaler and could not find how to change the gateway after. This worked perfectly to get me back to square 1
November 9, 2017 at 6:48 AM
actually, it seems there’s another (simpler and cleaner) way:
[email protected]# cd /flash/.recovery; sh rc.system_wipe_and_reset X Y
Platform SYSID = XXXXX
>>> Running this script is dangerous. It will destroy all <<>> customer data on this NetScaler, including the licenses. <<>> If something goes wrong, the box may be rendered unbootable, <<>> and would need to be returned to Citrix for remanufacturing. <<>> <<>> Are you absolutely sure you want to run this script? <<<
Enter yes to continue, no to exit
November 13, 2017 at 10:16 AM
cleaner and easier way to do full factory reset would be to use the wipe script on the flash card:
cd /flash/.recovery; sh rc.system_wipe_and_reset 3 3
July 18, 2018 at 12:19 AM
thanks for the info – much appreciated
February 11, 2019 at 6:52 AM
The solution with the script sounds like an easy one.
But are you sure it is available on all Netscalers?
/flash/.recovery does not exist on our MPX 5500