Check out example codes for "how to run a update comand in linux". It will help you in understanding the concepts better.

Code Example 1

sudo apt update && sudo apt upgrade -y
#or use it seperately
sudo apt update
sudo apt upgrade
#you make wanna run below command to remove unwanted
#and free up some space
sudo apt autoremove

Code Example 2

sudo apt-get update && sudo apt-get upgrade

Code Example 3

#gets package(s) update definitions
sudo apt update
#upgrades the package(s) for which update definitions are received
sudo apt upgrade

Code Example 4

sudo do-release-upgrade

Learn ReactJs, React Native from akashmittal.com