First, update your system’s package list by entering the following command:
sudo apt-get update
Next, upgrade all your installed packages to their latest versions with the command:
sudo apt-get dist-upgrade
Then reboot your Raspberry Pi
sudo reboot