How to reset a Citrix NetScaler back to factory defaults
Here's how to reset a NetScaler to factory defaults using 'clear ns config level'. I'll walk through basic, extended, and full levels so you know exactly what gets wiped.

On older Netscaler appliances, the command to clear your Netscaler configuration and reset it to factory defaults used to be:
clear config –c y
But on newer devices, the command is:
clear ns config level
where level is one of the following:
-
basic - which clears everything except NSIP, MIPs, SNIPs, network settings, HA, features, and the nsroot account
-
extended - which clears everything except NSIP, MIPs, SNIPs, network settings, & HA
-
full - which clears everything except teh NSIP and default gateway
So typically, I type this to do a full wipe:
clear ns config full
You can also do this through the GUI by going to System > Diagnostics > Maintenance > Clear Configuration. Use the drop down box to select basic, extended, or full then click the Run button.
With that said, I have run across newer devices (even running NS 9.1 and newer) that just don't clear all their config info. For those, I have just done the following to reset:
- SSH using Putty into the Netscaler and login
- Type "shell" to enter shell
- cd /nsconfig
- Rename the configuration by typing "mv ns.conf ns.conf.bak"
- Type reboot This should reset the device to the IP of 192.168.100.1 with the nsroot/nsroot account credentials. Your licenses and SSL certs will remain though since these are files and not part of the Netscaler config. You will have to delete them manually via WinSCP.
UPDATE 6/29/10: To completely reset your Netscaler to "factory new" conditions, it's a little bit more work but I have outlined the procedure here:

Jason Samuel
Product leader, advisor, and international speaker with 27+ years in enterprise end-user computing, security, and cloud. Has deployed infrastructure at Fortune 500 scale across 34 countries. 1 of 3 people globally to hold Citrix CTP + VMware vExpert + VMware EUC Champion concurrently. 200+ articles, 1,000+ reader discussions.
Previous Comments (3)
Using NetScaler MA Service in Citrix Cloud to monitor and manage all your NetScalers easily
If you're tired of managing NetScalers appliance by appliance, the MA Service in Citrix Cloud gives you monitoring, management, and analytics across all of them in one console.
citrix-netscalerNative OTP with NetScaler: Securing your Citrix Environment Overnight for FREE!
Did you know NetScaler has built-in Native OTP? You can add MFA to your Citrix environment overnight with no additional licensing. Here's the CUGC presentation and slide deck.
citrix-netscalerWhat's New with Citrix NetScaler 12.0 and NetScaler MAS 12.0 Walkthrough
Our CUGC Networking SIG walkthrough of NetScaler 12.0 and MAS 12.0 is up. 54 slides covering new features, known issues, workarounds, and what's coming next from Synergy 2017.