What's your name?

Enter your name to start a short security demo.

Blog

Step-by-Step: Managing Packages and Tools in Kali Linux with apt

Kali Linux comes with hundreds of security tools pre-installed, but no distribution can have everything ready out of the box — and the tools that are there need regular updates to keep up with the latest vulnerabilities and techniques. apt (Advanced Package Tool) is the system that manages this on Kali (and every Debian-based distribution).

Prerequisite
Run every command in this tutorial in Kali Linux's terminal (which we set up together in the Kali install tutorial).

Step 1: Update the package list
sudo apt update

This command doesn't install or update the software itself — it just downloads the latest list of available versions from the repositories. This should always be the first command you run before doing anything else with apt.

Step 2: Actually upgrade installed software
sudo apt upgrade -y

Now, using that updated list, it upgrades every installed package on the system to its latest version. For a more thorough upgrade that also handles new dependencies:
sudo apt full-upgrade -y

Step 3: Install a new tool
Say you want to install a tool we haven't used in earlier tutorials (like nikto, a web vulnerability scanner):
sudo apt install nikto -y

The same pattern works for installing any other tool in Kali's repositories.

Step 4: Search for a tool before installing
If you're not sure of the exact package name:
apt search wireless

This shows every package related to the word "wireless" along with a short description — a good way to discover new tools in a category.

Step 5: Remove a package you no longer need
sudo apt remove nikto -y

For a more thorough removal that also clears related configuration files:
sudo apt purge nikto -y

Step 6: Clean up space taken by old packages
Every time you upgrade the system, old package versions and temporary downloaded files pile up on disk. To free that space:
sudo apt autoremove -y
sudo apt clean

Running these two commands periodically, especially on a VM with limited disk space, prevents your disk from suddenly filling up.

Step 7: Check whether a package is installed
dpkg -l | grep nmap

This checks whether Nmap (or any other package) is installed and what version it is — useful for troubleshooting when a command says "Command not found."

Pro tip: build a weekly routine
The best habit is running this combination once a week:
sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y

This keeps your tools consistently up to date — exactly what matters in the security world, where new vulnerabilities are discovered every day.

Why is mastering apt essential?
Many beginners assume Kali comes with "everything ready" and never update it — which means they end up working with old, buggy tools. Mastering apt is a skill practiced from day one in all my security and Linux courses.