Access the UAP via SSH, and once in, issue the commands
syswrapper.sh restore-default and hit enter. The UAP should quickly reboot with factory default settings. Remember to not disconnect UAP from power source during this process. See Related Articles below if you need guidance on how to SSH into a device.
On the back of the UAP there is a small hole whereby a user can use a paperclip to depress a button and reset the UAP back to its factory default settings.
Once the white LED (or amber LED, depending on your model) re-appears and remains steady, you can commence with UAP adoption once more.
NOTE: The location of the reset button might vary on different UAP models, find your device's in the Quick Start Guide. You can download the current Quick Start Guide in https://www.ubnt.com/download/unifi/ using the left hand menu to find the correct product and scrolling down to the Documentation section.