Make sure you are connected to the router through the console port VIA a console cable.
Power on the router and log into the device VIA an SSH tool like Putty
Enable privileged mode.
Type write erase to erase current configuration
I will ask if OK! to continue, the hit enter again to complete.
After the NVRM has been deleted you’ll need to reload the IOS before router returns to default factory settings.
Once the router reboots you can configure.