The first command you want to issue is to update and upgrade the system:
sudo apt-get update && sudo apt-get upgrade
This will update your distro’s repositories and upgrade to the latest system packages.
Do you want to continue? [Y/n]
Hit Y [Enter]
Shouldn’t take long to upgrade, then you will be ready to install packages.