How To Update Kali Linux

Updates are a necessary part of any operating system as they not only improve the system’s performance but also help in user experience enhancement. Kali Linux is one of the most preferred Linux distributions when it comes to testing the vulnerability of any system or network. So, it is essential to keep Kali updated as sometimes updates also affect the functionality of pre-installed tools or applications. This guide will discuss the process of updating Kali Linux in detail.

Updating Kali Linux

Kali Linux can only be updated using different combinations of upgrade commands as there is no GUI-based method to update Kali Linux. Before updating Kali Linux you can check the current version of the Kali operating system by executing the command below:

cat /etc/os-release

Checking Kali Linux version by reading os-release file using cat command

Before updating Kali Linux it is necessary to update the packages list of the Kali’s default app installer:

sudo apt update

 

Updating Kali Linux packages list

Updating Kali Linux Packages

If you are looking to update the Kali Linux packages then use the upgrade command. This will only install the updated versions of apps whose newer versions are available. In short, this command only updates the available updates for applications installed on Kali:

sudo apt upgrade

Upgrading the applications installed on Kali Linux using apt upgrade command

Further, keep in mind that this command does not remove or reinstall the already installed packages. On executing the sudo apt upgrade on Kali Linux you might encounter some errors at the end so to fix them use the –fix-missing flag with the upgrade command as given below:

sudo apt upgrade --fix-missing

upgrading packages on Kali Linux using apt upgrade command along with --fix-missing flag to fix any errors encountered.

Once you are done with the upgrade reboot the system to apply the changes.

Updating Complete Kali Linux

If you are looking to have a system update for Kali Linux then use the full flag with the upgrade command. This will not only install the new packages to satisfy the dependencies but can also remove any conflicting packages. Further, it also performs comprehensive system upgrades which also include its OS version and kernel as well.

sudo apt full-upgrade -y

Updating Kali Linux comprehensively using the apt full-upgrade command.

After executing the apt full-upgrade command check the system version by executing the following command:

cat /etc/os-release

Here you can see that the Kali version has been changed:

Checking Kali Linux version by reading os-release file using cat command after executing the apt full-upgrade command.

There is another way to fully update the Kali Linux and that is by using the dist flag with the upgrade command. Here is the below command:

sudo apt dist-upgrade

Both the apt dist-upgrade and apt full-upgrade commands serve the same purpose:

Updating Kali Linux comprehensively using the apt dist-upgrade command.

Note: Before using any of the above update commands it is recommended to see the sources list file as it has software repositories that are used by the system to upgrade. To simply read the file execute the below command:

cat /etc/apt/sources.list

reading the Kali Linux sources.list file to verifying the details of repositories.

The sources list of Kali should have the following data:

# See https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/

deb http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware

# Additional line for source packages

# deb-src http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware

Further, if you want to install the latest or desired kernel version on Kali Linux then use the below-given command syntax::

sudo apt install linux-image[kernel-version-kali-linux-version]

Updating a Specific Package in Kali Linux using the apt Package Manager

Another thing that you might wanna do is to update any specific package in Kali. This is useful if you are looking to install only specific packages so in that case use the below syntax:

sudo apt install --only-upgrade [package-name]

Updating a specific package on Kali Linux using install --only-upgrade command

Conclusion

To update Kali Linux you can use the apt full-upgrade command or apt dist-upgrade command. However, if you want to just update the packages on Kali then use the apt upgrade command. Further, if you want to update only specific packages on Kali Linux then use the apt install –only-upgrade [package-name] command.

 

Index
Scroll to Top