Kali Linux is a Debian-based distribution and is renowned as one of the best operating systems for penetration testing also with a vast and dedicated user community. Designed for ethical hacking and cybersecurity professionals, Kali Linux is known for its extensive suite of pre-installed penetration testing tools.

In this article, we will walk you through the essential steps to keep your Kali Linux system updated, thereby ensuring optimal security and performance.


To update Kali Linux, you will need the following:

  1. A system running Kali Linux (ideally installed as a virtual machine for safe testing).
  2. Terminal window (shortcut: Ctrl+Alt+T).
  3. Root privileges.

Kali Linux running Debian under the hood uses the apt or apt-get Package management system. Here's a step-by-step guide on how to update your Kali Linux installation:

Step 1: Check the Source List Files

Before updating Kali Linux, ensure your system uses the correct remote repository for package downloads. Kali Linux's package sources are specified in configuration files located at /etc/apt/source.list and /etc/apt/source.list.d/. To check the sources, open the configuration file using the following command:

cat /etc/apt/source.list

You should see an output that resembles this:

Img 1.png

Remember to check similar files inside the /etc/apt/source.list.d/ directory for additional sources.

Step 2: Update the Package Manager

First, ensure you update the package repository to fetch the latest package lists. To do this, run the following command:

sudo apt update

If you are logged in as the root user, there's no need to use sudo.

Step 3: Upgrade Your System

Use any of the commands below to get the latest packages and patches for Kali Linux.

  • apt upgrade: This command downloads and updates packages without removing any previously installed packages.
  • apt full-upgrade: It also downloads and updates packages but may remove already installed packages if necessary.
  • apt dist-upgrade: This command functions similarly to a regular upgrade but intelligently handles changing dependencies, removes obsolete packages, and adds new ones.

Choose the command that suits your requirements best, type it into the terminal, and press Enter. The system will prompt you to confirm the installation; simply type 'yes' or 'y' and press Enter to proceed.

Pro Tip: You can update Kali Linux using a single command: apt update && apt upgrade.

Step 4: Remove Unnecessary Packages

After performing the upgrade, you may have obsolete packages left on your system. To free up disk space and maintain a tidy system, use the following command to remove unnecessary packages:

sudo apt autoremove

This will remove any packages that are no longer needed, keeping your system efficient and clutter-free.


To ensure your Kali Linux system remains at its peak performance and is resilient against potential security threats, it's crucial to regularly check for and apply updates. We recommend checking for new updates every couple of weeks, particularly if you're running a default installation. By following the steps outlined in this article, you should now be well-equipped to keep your Kali Linux system up-to-date and secure using the provided commands and best practices.

Table of Contents
Great! Next, complete checkout for full access to GeekBits.
Welcome back! You've successfully signed in.
You've successfully subscribed to GeekBits.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info has been updated.
Your billing was not updated.