Check out example codes for "update ubuntu in terminal". It will help you in understanding the concepts better.

Code Example 1

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

Code Example 2

# "To update Linux type:"
sudo apt-get update
# Enter your user's password.

Code Example 3

sudo do-release-upgrade

Code Example 4

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

Learn ReactJs, React Native from