This is a list of the apt commands I use the most in my Ubuntu servers.
The file /etc/apt/sources.list contains a list from which to retrieve the desired package files.
To get the latest info about all Ubuntu packages from the repositories
apt-get update
I normally update my servers like that
apt-get update # Fetches the list of available updates apt-get upgrade # Strictly upgrades the current packages apt-get dist-upgrade # Installs kernel updates
To install an Ubuntu package
apt-get install package-name
How to list all installed packages in Ubuntu
apt list --installed
This command is used to update a PPA or any Ubuntu package
apt-get install --only-upgrade package-name