Shortest route might be just to flash factory image to it with MiFlash (use Clean all option), this makes it 100% official state.
http://www.miui.com/thread-17695596-1-1.html
Stable MIUI 10 factory image is not yet available(?), need to use MIUI 9 and upgrade OTA or use developer version...