In this article, you will learn to update and upgrade Kali Linux.
When you update Linux-based operating systems then you can update or upgrade all the packages (It is known as programs in Windows OS) at once or you can choose what package you want to update or upgrade.
If you ask me that what is the best way to update or upgrade Kali Linux or Debian-based distros then I suggest using the command line to do this task. The command line makes our life easier and beautiful. You can write a script and it will execute that script. So it will be done according to that script. I love this way. But again it is your choice because nowadays you can use the graphical way or the command way.
There are few steps that you can follow while making this update or even upgrading the machine.
Checking For Available Updates
It is always a good practice to check for updates firstly. So it will update the local caches. To achieve this step, you can use the below command.
sudo apt update
sudo apt-get update
Update and Upgrade All Packages In Kali Linux
If you want to update all packages for which new versions are available. And also you want to install the essential dependencies along with removing the interfering packages then you can use the below command.
sudo apt full-upgrade
Also, you can use the below command for the same.
sudo apt dist-upgrade
sudo aptitudehe full-upgrade
Updating The Cache And Packages In One Command
You can write the same above command in one line as below. Along with command you can use -y to perform the command without asking your permission.
sudo apt update && sudo apt full-upgrade -y
How To See which packages will be upgraded in Kali Linux
If you want to list the packages that will upgrade then you can use the below command and it will display the lists.
sudo apt list --upgradable
How To Update One Package In Kali Linux
Sometimes, you want to update or upgrade any one package then you can use the below command.
sudo apt install package_name
For instance, if you want to update or upgrade Metasploit Framework then the command will look like as below.
sudo apt install metasploit-framework
How To Remove Unused Programs And Kernels In Kali Linux
Many times, update install some dependencies which are not essential later. So it is a good idea to delete that packages. And you can use the below command to achieve it.
sudo apt autoremove -y
How To Clear The Package Cache In Kali Linux
It is a good practice to clear the package cache. When you scan for the first time, it creates a small file but for the second time, it creates a bigger one. You can find the below command useful for that.
sudo apt clean -y
sudo apt autoclean -y
In this tutorial, you learned to update and upgrade Kali Linux, and also same, you can use it for the other Debian-based distros. But if you are getting any problem then you can write us a comment.
Also, you may be found the below articles useful, take a look.