This question already has an answer here:
Good day I have the release version of Qgis (2.16) installed into Mint and it can be updated just with apt install qgis whenever a notification comes out that a new version is released.
I want to also install the latest master (2.99) alongside 2.16 for testing but I don't want 2.16 to be overwritten in case there is a problem with master.
Unlike the Windows scenario where you can install different versions of the osGeo4W package to have several versions of Qgis, I haven't been able to work out a way of just creating a 2nd Qgis installation alongside the existing one. I haven't been able to find a simple install package I can download, just repositories, but I haven't been able to work out how to get the master version from them.