Hot to overwrite a pre-installed version of Android on M2+

Hi to all, I have installed an Android 4.4 OS on my BPI M2+. Now I would like to erase this version and install an Android 7 version. I tried to make the same process that I made to install Android 4.4 but the OS doesn’t update to a new version. Is there a specific procedure to follow? Thank you