It is always better to update your Kali Linux for security purposes, or if you have heard the new version contains some additional packages, repositories, tools, Desktop environments, and themes.
Thus, updating is always better to maintain your Kali Linux system. We have mentioned a simple guide to updating your Kali Linux version, and at the end of this, we have solved some common errors.
Kali Linux update command in 2022
- First Make sure in the repository you have the File “Rolling Release.”
- Enter this command: “$ sudo apt update.”
- Enter this Kali Linux Command to update “$ sudo apt upgrade” If asked press Y to continue.
- Congrats! The entire kali Linux OS has been Updated.
Also read: Linux distro for gaming laptops
Update Kali Linux on different Machines
On Virtual Box
Every Latest Kali Linux version comes with additional improvements, whether a security or user experience.
No matter which machine you use Kali Linux, you should always keep updating for a better user experience with Kali Linux, so let’s see how to Update Kali Linux in a Virtualbox.
Updating Kali Linux on virtual is just a few steps process, simply follow these steps with images.
First, you have to download kali OVA’s file or image for Virtual Box, you can easily get it from their official website.
- Go to the Important Alliance Option in Virtual Box
- Pick the OVA file, you just downloaded.
- Click on it, open it and keep ticking YES to every option.
- Enter $ sudo apt update
- Enter $ sudo apt upgrade + press Y
- Congrats, you have successfully updated the Kali Linux on your Machine.
Step-by-Step Guide on updating Kali Linux on virtual box
Step:1 First, download an Image from their official website, it may take some time due to its large space.
Step:2 Once you download the file, now open> Virtual box on your Desktop> head over the top left> Click on Important alliance. Or Use this shortcut Key CTRL+I.
Step:3 Now you can import that file you just download> press the Import button to import it. It will take some time, to wait for its completion.
Step: 4 Once the process is completed, you can now manage your resources such as RAM, Storage, and some basic settings from there.
Step:5 Now can enter the command $ sudo apt update and $ sudo apt upgrade to update this to the latest version.
Also Read: Linux Mint vs Ubuntu
Many Kali Linux users use VMware to run Kali Linux, due to its ease in sharing two operating systems on one machine. And when it comes to updating, be ready to follow these steps, they are no more different than updating kali Linux on a desktop.
- Open VMware
- Login into Kali Linux
- $ sudo apt update
- $ sudo apt upgrade
- Reboot your Vmware
- Congrats, you have updated Kali Linux on VMware
To update a Kali Linux on a Live USB the process is the same we have mentioned already. However, a few important steps you should follow here while doing this.
- You must have space on your USB
- Each Kali Linux Update requires more than 2+ GB of space.
- Before using $ sudo apt update command on a Live USB.
- Use this command $ apt list –upgradable to check which packages are needed to be updated.
- You can update only specific packages by this command $ sudo apt update (Package Name)
Updating Kali Linux 2022.2 on Desktop
Everyone knows how to update Kali Linux, but not all of us know some essential things while following this procedure so you will not catch errors later.
The first thing before updating, you should check out your repository for a specific file. The file is known as Kali rolling release. Most of the time it should be there, check that out.
Step.1 Enter this Command top update kali Linux: [email protected]:~$ /etc/apt/sources.list
And there should be these files already in the source.ist files.
- deb http://http.kali.org/kali kali-rolling main contrib non-free
- deb-src http://http.kali.org/kali kali-rolling main contrib non-free
Now, you can move on to update your Kali Linux.
Step.2 Hit this command- sudo apt-get update
You will see there something like that in the below image, a list of packages that needed to update.
And tools and new features are available for the newest Kali Linux version, and yes, the below image may not have the same packages that you will get on your side.
Take it as an example.
Step.3 To update them at once, enter this command apt-get upgrade.
Before long, it will ask you to continue or not, press Y to continue updating.
Doing this every single package will start updating. However, it will require an internet connection as well. And up to 2GB of Data may be required.
You can see the below image for a better understanding.
You have almost done it here, however in some rare cases.
The system packages will not get updated with this. It is better to update them as well by entering this command.
- $ sudo apt dist-upgrade
At this moment, your System has updated the Kali Linux, if everything has been set up on your side, reboot your desktop once to see updated features.
Also read: Install MX Linux Step by Step
Update Repository of source list in Kali Linux
You might face errors and feel difficulties in updating; sometimes, one of the big reasons is not updating your repository. You can take it as when updating kali Linux some repository is needed in the source. list file without them the process will not finish.
Moreover, you can also get source packages that come up with a new version by processing this.
By following these steps, you can update your repository.
- Click on this link scroll down, and you will see a link for ‘Kali sources.list Repositories’ get into the page.
- Copy the Regular repositories & Source repositories commands from there.
- Open the Kali Linux Terminal
- nano /etc/apt/sources.list and enters this command, to go to the source.list section.
- And again, run the same command to update kali Linux- It will work fine this time.
Can you update Kali Linux offline?
Updating Kali Linux requires a fast and stable internet connection, it is true you can not update Kali Linux offline, however, there some debian-based repositories that come offline it is the extreme you can get offline in Kali Linux.
But, we have a way to go for people who want a working solution for this.
It all starts with a USB, yes, if you know how to install Kali Linux in a Live USB then this process will turn out easier for you.
Firstly you have to Install Kali Linux in a Live USB and make sure it has the updated version that you required, ask any friend to do that for you.
After that, you can get the updated version from the USB, it means you can run the updated version on your machine.
It is the only way you can do that offline.
Problems with updating kali Linux and solution
1) How to fix -bash apt-key: command not found when entering apt-update
This problem takes place when you have just installed Kali Linux and are attempting to update.
Here is the solution for this.
- Open your Linux Terminal
- Enter /etc/apt/sources.list
- Paste this file there “deb https://http.kali.org/kali kali-rolling main contrib non-free” > /etc/apt/sources.list
- Run this command (optional) apt-key adv –keyserver hkp://keys.gnupg.net –recv-keys 7D8D0BF6
- Update again, it will work this time command
How to fix kali Linux broken packages and Apt update error not working
The problem mostly appears when a user has to face dependency issues, as when updating Kali Linux some old packages which require dependencies cause this error.
Here is how to fix this Problem,
Open your Linux Terminal
- Put the same command “apt-get update && apt-get upgrade”
- But this time add this command “sudo apt-get autoclean && sudo apt-get clean && sudo apt-get autoremove” to auto-clear dependencies.
- It should work now, press Y to continue.
Also read: Fedora vs Ubuntu