https://qgis.org/en/site/forusers/alldownloads.html#id16
sudo nano /etc/apt/sources.list
- Copy and paste both lines
Change bionic
by xenial
depending the version of your ubuntu
For Ubuntu 16.04 use xenial
For Ubuntu 18.04 use bionic
For Ubuntu 19.04 use disco
deb https://qgis.org/debian bionic main
deb-src https://qgis.org/debian bionic main
afeter
ctrl+o
ctrl+x
wget -O - https://qgis.org/downloads/qgis-2019.gpg.key | gpg --import
gpg --fingerprint 51F523511C7028C3
gpg --export --armor 51F523511C7028C3 | sudo apt-key add -
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 51F523511C7028C3
sudo apt-get update
sudo apt-get install qgis qgis-plugin-grass
Doc Java https://gist.github.com/ridixcr/3311083d7b9003250c5a3d5bc941a044
Doc NodeJS https://gist.github.com/ridixcr/a3502cbcf2ad40ff69fad2a270c8c374
Doc QGis https://gist.github.com/ridixcr/3017e1fafe2324bbe4f0a67c3765efbf
Uninstall QGis https://www.howtoinstall.co/en/ubuntu/xenial/qgis?action=remove
I updated the steps to install the Qgis in version 3.8.x Zanzibar