How do I reimage openwrt in such a way that all my settings will be lost. I've been having some issues, and I want to ensure that it's not a lingering setting, I want this to be a fresh install.
OpenWRT versions from Kamikaze onwards (which is basically Kamikaze and Backfire, but not White Russian) do not use NVRAM to store settings or configuration. It is all stored in the filesystem, either in the base squashfs image or the overlayed jffs image. This means you should be able to re-flash the image and get back to "factory defaults".
The way to flash an OpenWRT image is described at http://wiki.openwrt.org/doc/howto/installing . Once you have OpenWRT installed the first time, the easiest way to reflash is to use the "via the OpenWrt command line" method. Pay attention to the differences between
.trx images and
.trx images are "raw" generic openwrt images used by the command line installation method.
.bin images have vendor-specific headers and, so you need to have the appropriate image for your router.
There are some settings stored in NVRAM that are used by the bootloader but I don't think they should persist once the Linux image has booted. Possibly MAC addresses may persist, but can be overridden in the filesystem configuration anyway.
Whatever you do, do not indiscriminately wipe the NVRAM. You will almost brick the device, and may be bricked unless you can find on the net the appropriate settings to restore manually for your device.
What is your issue?
If your issue is, that you are developing, and you want to be sure that your latest changes in your build process really are copied into the new firmware image, you don't have to "reimage OpenWRT" (whatever that should mean)
To analyze your freshly created openwrt bin image file you can use
binwalk -e imagefile.img
this will unpack the image so you can look inside the folder structure if everything is there in the correct place and has the correct permissions set (executable, readeable,...)