For 3rd party firmware, it is not necessary to delete it. What you need to do is overwrite it - flash it. If you want to change to your default Dlink firmware, as you said, reset the router until the power lid is blinking. Assign a fix IP address to your computer, such as 192.168.0.100, then flash it over with your desire Dlink firmware. After it reboot, it will be done.
However, if you want to upgrade your firmware to another DDWRT firmware, what you have to do is set it to default and flash it with your desire firmware within the web GUI.