1) Login to your local Unifi portal and make sure to make a backup (via Maintenance)<p>2) sudo apt remove unifi<p>3) sudo apt auto-remove (optional, this is to clean packages that are not in use)<p>4) sudo vim /etc/apt/sources.list (or use your favourite text editor)<p>At this point, you should see your previous one:
deb http://www.ubnt.com/downloads/unifi/debian stable ubiquiti<p>Replace the word STABLE for UNIFI5. Now it should be like this:
deb http://www.ubnt.com/downloads/unifi/debian unifi5 ubiquiti<p>Exit and Save<p>5) sudo apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50<p>6) sudo apt update<p>7) sudo apt install unifi<p>Login to your local Unifi portal and you should have version 5!