Updating and Upgrading
If you wish to upgrade to the UniFi Controller software Version 5, first update the UBNT sources list using the following command:
sudo sed -i 's/stable\|unifi4/unifi5/' /etc/apt/sources.list.d/ubnt.list
To update to the latest UniFi Controller software Version 4 release, or optionally upgrade to UniFi Controller software Version 5, use the standard Debian package update and upgrade commands:
sudo apt-get update && sudo apt-get upgrade -y
The UniFi Controller software will be updated or upgraded along with all other packages installed on your Raspberry Pi.
Alternatively, if you just want to update the UniFi Controller software only, run the initial package installation command again:
sudo apt-get install unifi -y