Update & Upgrade Kali
A fresh Kali image is often weeks or months old. Updating ensures your tools, libraries, and security patches are current. Because our lab is isolated, we'll briefly give Kali internet access, update, then take it offline again.
Step 1 — Temporarily enable internet access
Shut Kali down, then in VirtualBox open Settings → Network → Adapter 2, tick Enable Network Adapter, and set Attached to: NAT. Boot Kali and confirm it can reach the internet:
$ ping -c2 kali.org 64 bytes from kali.org: icmp_seq=1 ttl=54 time=14.2 ms
This is the only machine we connect to the internet, and only temporarily. We'll disable Adapter 2 again once updates finish.
Step 2 — Refresh the package lists
apt update downloads the latest list of available packages. It does not install anything yet.
$ sudo apt updateSigning-key error? Older images may report "The following signatures were invalid". Kali rotates its repository key periodically. Fix it by installing the current keyring, then update again:
$ sudo wget https://archive.kali.org/archive-keyring.gpg -O /usr/share/keyrings/kali-archive-keyring.gpg $ sudo apt update
Step 3 — Perform the full upgrade
Upgrade every installed package. On Kali, full-upgrade is preferred because it will add or remove dependencies as needed.
$ sudo apt full-upgrade -yThis can take a while on first run as it may download hundreds of megabytes. Let it finish, accepting any prompts (the defaults are safe).
apt full-upgrade bringing Kali up to date.Step 4 — Clean up
Remove packages that are no longer needed and clear the local download cache to reclaim disk space.
$ sudo apt autoremove -y $ sudo apt clean
Step 5 — Reboot and go back offline
If the kernel was upgraded, reboot so the new one loads:
$ sudo rebootThen shut down and disable Adapter 2 (NAT) again so Kali is back on the isolated network only.
Make it a habit. Re-run sudo apt update && sudo apt full-upgrade -y every couple of weeks (with internet temporarily enabled) to stay current.
Checkpoint: Kali is fully upgraded, cleaned up, rebooted, and back on the isolated network. Next we'll configure it for comfortable daily use.