RT3200 back to stock firmware

I want to go back to the vendor firmware on one of my RT3200 as I want to sell it, can someone explain how to achieve this - walk me through the necessary steps? :slight_smile:
I used Daniels installer to convert the filesystem to UBI.