In this article, you will learn to update and upgrade Kali Linux.
Kali Linux is one of the best penetration-based Linux operating systems. It is very useful for pentester. Also, it is good for finding loopholes in a particular software or website. So let’s know how 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 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 more 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 a few steps that you can follow while making this update or even upgrading the machine.
Checking For Available Updates
firstly It is always a good practice to check for updates. 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 the 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, if 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.
- The hostnamectl command in Linux with examples
- What is the rsync command & how to use it
- Learn on Kali Linux Official
How to update and upgrade Kali Linux | How to update Kali Linux | How to upgrade Kali Linux | What is the benefit of update and upgrade Kali Linux?| Why is it important to update and upgrade Kali Linux | Is it good to update and upgrade Kali Linux |