Updating vs. Upgrading (apt update & apt upgrade)
Concept & Overview
New system administrators often confuse updating and upgrading. In Debian and Ubuntu environments:
- sudo apt update: Refreshes your local cache of package lists from upstream repository servers (/etc/apt/sources.list). It discovers which newer package versions exist, but does not modify or upgrade any software on disk.
- sudo apt upgrade: Compares your currently installed software against the refreshed list and downloads/installs the newer package versions.
Running apt upgrade without running apt update first will either install outdated versions or fail completely because your system does not know newer releases exist!
sudo apt update, then upgrade installed packages to their latest versions with sudo apt upgrade.Command Syntax Reference
| Command / Syntax | Description |
|---|---|
sudo apt update | Refresh package repository index lists |
sudo apt upgrade | Upgrade installed packages to newest versions |
Verification Objectives
These conditions will be automatically verified when you run commands inside the interactive terminal simulator:
- ○Run "sudo apt update" to refresh repository index
- ○Run "sudo apt upgrade" to upgrade installed packages
Ready to complete Quest 47?
Test your skills live in the browser terminal with an emulated Linux filesystem, real-time command evaluation, and instant step-by-step hints.