How To

Upgrade Kali Linux to the Latest Version

Kali Linux is a Debian-based distribution built for penetration testing, security auditing, and forensics. As a rolling release, Kali receives continuous updates – but major version upgrades still require careful handling to avoid breaking your tools and configurations.

Original content from computingforgeeks.com - post 46105

This guide walks through upgrading Kali Linux to the latest version (currently Kali 2025.4 with kernel 6.16.8, GNOME 49, KDE Plasma 6.5, and Xfce updates). The same process applies to any future Kali rolling release. We cover backing up your system, updating sources, performing the full upgrade, handling configuration conflicts, and troubleshooting common issues.

Prerequisites

Before starting the upgrade, make sure you have the following in place:

  • A running Kali Linux installation (any previous version)
  • Root or sudo access
  • At least 10 GB of free disk space for downloaded packages
  • Stable internet connection – the upgrade downloads several gigabytes of packages
  • A full backup of your home directory and any custom configurations

Take a snapshot if running Kali in a virtual machine. For bare metal installations, back up critical data to an external drive or remote server before proceeding.

Step 1: Check Your Current Kali Linux Version

Start by confirming which version of Kali you are currently running. This gives you a baseline to verify the upgrade completed successfully.

cat /etc/os-release

The output shows your current Kali version and distribution details:

PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
VERSION_ID="2025.3"
VERSION="2025.3"
VERSION_CODENAME=kali-rolling
ID=kali
ID_LIKE=debian

Also check the current kernel version for reference:

uname -r

This returns your running kernel version, for example:

6.11.2-amd64

Step 2: Update the Kali Linux Sources List

The APT sources list tells your system where to fetch packages. Make sure it points to the official Kali rolling repository. Open the sources file:

sudo vi /etc/apt/sources.list

The file should contain this single line. Replace any existing content with:

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

If you had older entries pointing to specific release codenames (like kali-last-snapshot or sana, moto, etc.), replace them with kali-rolling. The rolling repository always has the latest packages.

Verify the repository key is present on your system. Kali signs its packages with a GPG key, and missing keys cause authentication errors during updates:

wget -q -O - https://archive.kali.org/archive-key.asc | sudo apt-key add -

On newer Kali versions, use the signed-by method instead. The key should already be at /usr/share/keyrings/kali-archive-keyring.gpg. If it is missing, install it:

sudo apt install kali-archive-keyring

Step 3: Update Package Lists

Refresh the local package index from the Kali repositories. This downloads the latest list of available packages and their versions.

sudo apt update

A successful update shows the repositories being fetched and ends with a summary of available upgrades:

Hit:1 http://http.kali.org/kali kali-rolling InRelease
Get:2 http://http.kali.org/kali kali-rolling/main amd64 Packages [20.1 MB]
Get:3 http://http.kali.org/kali kali-rolling/contrib amd64 Packages [116 kB]
Get:4 http://http.kali.org/kali kali-rolling/non-free amd64 Packages [198 kB]
Get:5 http://http.kali.org/kali kali-rolling/non-free-firmware amd64 Packages [11.2 kB]
Fetched 20.4 MB in 8s (2,550 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
456 packages can be upgraded. Run 'apt list --upgradable' to see them.

If you see GPG key errors like NO_PUBKEY, go back to Step 2 and install the Kali archive keyring.

Step 4: Perform the Full Kali Linux Upgrade

Run a full distribution upgrade. The full-upgrade command handles package removals and dependency changes that a regular upgrade would skip – this is required for major version transitions.

sudo apt full-upgrade -y

This process downloads and installs all updated packages, including new kernel versions, desktop environment updates, and security tools. Depending on your internet speed and the number of packages, this can take anywhere from 15 minutes to over an hour.

During the upgrade, you may see prompts about configuration file changes. The next step covers how to handle those.

Step 5: Handle Configuration File Conflicts

When upgraded packages ship new configuration files that differ from your modified versions, APT asks what to do. You will see a prompt similar to this:

Configuration file '/etc/samba/smb.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation

Here is how to decide:

  • Press D first to view the differences. This shows exactly what changed between your version and the new one
  • Choose Y (install new) if you have not customized that config file, or if the changes are minor and your customizations are not important
  • Choose N (keep yours) if you have made specific customizations you want to preserve. You can manually merge the new changes later

For most users doing a standard upgrade, accepting the maintainer’s version (Y) for each prompt is the safest choice. If you have custom tool configurations, keep your version and review the .dpkg-new files that APT saves alongside your configs.

Step 6: Remove Obsolete Packages

After the upgrade, clean up packages that are no longer needed. These are old dependencies that no installed package requires anymore.

sudo apt autoremove -y

Then clear the local package cache to free disk space:

sudo apt autoclean

These two commands together can reclaim several gigabytes of disk space, especially after a major version upgrade.

Step 7: Reboot and Verify the Kali Linux Upgrade

Reboot the system to load the new kernel and apply all changes:

sudo reboot

After the system comes back up, verify the upgrade by checking the version again:

cat /etc/os-release

The VERSION field should now show the latest release:

PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
VERSION_ID="2025.4"
VERSION="2025.4"
VERSION_CODENAME=kali-rolling
ID=kali
ID_LIKE=debian

Confirm the kernel was also updated:

uname -r

You should see the new kernel version:

6.16.8-amd64

If you use KDE desktop on Kali Linux, verify your desktop environment version from Settings. GNOME users can check with:

gnome-shell --version

Step 8: Troubleshoot Common Upgrade Issues

Kali upgrades usually go smoothly, but here are the most common problems and their fixes.

Fix Broken Packages

If the upgrade was interrupted or packages failed to configure, fix them with:

sudo dpkg --configure -a
sudo apt --fix-broken install -y

The first command finishes configuring any partially installed packages. The second resolves dependency issues by installing missing dependencies or removing broken packages.

Resolve Held Back Packages

Sometimes apt upgrade holds back packages when their dependencies changed. Check for held packages:

apt list --upgradable

If packages are still listed as upgradable after running full-upgrade, force their installation:

sudo apt full-upgrade -y

Running full-upgrade a second time often resolves packages that were held back during the first pass.

Fix Kernel Boot Issues

If the system fails to boot after upgrading, select the previous kernel from the GRUB boot menu. On the GRUB screen, choose “Advanced options for Kali GNU/Linux” and pick the older kernel entry. Once booted into the working kernel, reinstall the latest kernel:

sudo apt install -y --reinstall linux-image-amd64 linux-headers-amd64

Then update GRUB and reboot:

sudo update-grub
sudo reboot

Recover from a Failed Upgrade with Disk Space Issues

Running out of disk space during an upgrade leaves packages in a broken state. Free space by clearing the APT cache:

sudo apt clean

Check available space on the root partition:

df -h /

You need at least 5 GB free to complete the upgrade. If space is still tight, remove old kernel versions you no longer need:

sudo apt autoremove --purge -y

Then resume the upgrade with sudo apt full-upgrade -y.

Reset Desktop Environment After Upgrade

If your desktop looks broken or the login screen does not appear, reinstall the default Kali desktop metapackage. For the default Xfce desktop:

sudo apt install -y kali-desktop-xfce

For GNOME desktop users:

sudo apt install -y kali-desktop-gnome

You can also install VirtualBox on Kali Linux to test upgrades in a safe environment before applying them to your main system.

Keeping Kali Linux Updated Going Forward

Since Kali is a rolling distribution, you do not need to wait for major version releases. Run these commands regularly – weekly is a good cadence – to stay current:

sudo apt update && sudo apt full-upgrade -y

Regular updates keep the upgrade size small and reduce the chance of conflicts. Skipping months of updates and then running a massive upgrade is where most problems come from.

For a reference on all upgrade options and best practices, see the official Kali updating documentation.

If you need to install kernel headers on Kali Linux for building custom modules or VMware tools, do that after the upgrade completes so the headers match your new kernel version. For setting up additional GNOME themes on Kali Linux, the latest desktop packages provide better theme compatibility.

Conclusion

You have upgraded Kali Linux to the latest rolling release using the standard APT upgrade path. The process covers updating sources, running a full upgrade, cleaning up obsolete packages, and troubleshooting common issues like broken packages and kernel problems.

For production penetration testing environments, keep your Kali installation updated weekly, take VM snapshots before major upgrades, and always verify your critical security tools work correctly after each update.

Related Articles

Databases How To Install MariaDB 10.x on Kali Linux Proxmox How To Secure Proxmox VE Server With Let’s Encrypt SSL AlmaLinux Configure Firewalld on Rocky Linux 10 / AlmaLinux 10 / RHEL 10 Security 6 Ways to Keep Hackers Out of Your Website

Leave a Comment

Press ESC to close