Updating Raspberry Pi Remotely
There are mainly two ways of updating the version of Raspberry Pi by remotely accessing it one is by using the commands in terminal and the other is without changing the repositories. To update a Raspberry Pi remotely, first you need to access it remotely using any software. I am using a VNC viewer which you can download from here. And how to connect to Raspberry Pi device remotely read, remotely connect to Raspberry Pi.
Updating the Distribution on Raspberry Pi Remotely
Once you have accessed the Raspberry Pi remotely, go through the following steps to update your Raspberry Pi software package remotely:
Step1: Open the terminal of Raspberry Pi by clicking on the terminal icon on the top menu bar:
Step 2: Since the Raspberry Pi is a Debian so it uses the apt package manager and before upgrading, the package lists are to be upgraded by executing the following command:
Step 3: Now it’s time to update the packages and for that execute the following command in the terminal:
In order to continue the process of upgrading the packages type Y in the terminal and press Enter:
Step 4: Once the process of upgrading is complete it’s time to reboot the Raspberry Pi to apply the changes by executing the following command:
Step 5: After rebooting, it’s time to clean the system from the items left by the packages that are no longer needed by the Pi or in short, to remove the packages that are not required by the Raspberry Pi anymore, for that execute the following command in the terminal:
Step 6: After removing the unnecessary files now it’s time to delete their cache files as well so for that purpose execute the given command in terminal:
This way you can update the software packages on your Raspberry Pi by accessing it remotely.
Alternative Way of Updating Raspberry Pi Remotely
Raspberry Pi can also be updated by modifying the sources list file. Do the below given steps to update the distribution of Raspberry Pi remotely:
Step 1: Open the sources list file by executing the following command:
Step 2: Now just replace the name of your current version with the version to which you want to upgrade like on my case I have “buster” version and the new version which is “bullseye” so I will replace the “Buster” with “bullseye”:
Step 3: After that save the file and exit it. Next all you need to do is to update the packages by executing the following command:
Step 4: Now, upgrade the packages:
Step 5: After upgrading the packages, it’s time to update the distribution:
Step 6: Once the packages are updated your upgrade is complete, all you need to do is to reboot your Pi by execute the reboot command:
Conclusion
Raspberry Pi is a card sized computer having the capability of performing all the functions that a regular size computer can do. To ensure that Raspberry Pi is working perfectly it is imperative to keep it updating regularly which also can contribute to enhancing the efficiency of the device. To update Raspberry Pi distribution, you can do it by using the upgrade command or by replacing the current version name with new one in the “sources.list” file.