If you are wondering about how to update the Raspbian OS which you have probably installed on your SD card months or a year back and already have setup many components or modules on it, here is the answer.
You simply need to run the following commands to safely update your Raspbian OS:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade