You can get the .deb file from the „update“ button on the UI.
wget https://fw-download.ubnt.com/data/unifi-controller/9710-debian-6.0.41-c62308efcb1e464fbab2d40a643112dc.deb sudo apt install ./9710-debian-6.0.41-c62308efcb1e464fbab2d40a643112dc.deb
Updating it, should work via apt, but it seems to have problems.