A list of packages and their repositories is stored in your Linux Machine and it can be viewed from :
cat /etc/apt/sources.list
Before you upgrade your packages or install an important package, it's a good practice to update this list of repositories:
sudo apt-get update
To physically update your packages you want to use the upgrade command:
sudo apt-get upgrade
man apt-get to view tons of package functionalities within Linux
man apt-get
sudo apt-get autoremove will remove packages that are no longer required
sudo apt-get autoremove
To Install a new package, you can use:
sudo apt-get install package
e.g
sudo apt-get install finger