Problem Statement
Which command updates package lists on Debian/Ubuntu systems?
Explanation
Apt update (or apt-get update) refreshes the local package index from configured repositories, downloading information about available packages and their versions. This doesn't install or upgrade packages - it just updates the package lists so apt knows what's available. Run this before installing packages to ensure you get the latest versions.
The apt command is newer, more user-friendly interface to apt-get with colored output and progress bars. Commands: apt update (refresh package lists), apt upgrade (upgrade installed packages), apt install package (install new package), apt remove package (remove package), apt search keyword (search packages), apt show package (show package details).
Common workflow: sudo apt update (refresh lists), sudo apt upgrade (upgrade all packages), sudo apt install nginx (install nginx). Use apt autoremove to remove unused dependencies. Configuration files in /etc/apt/sources.list and /etc/apt/sources.list.d/ define repositories. Understanding apt is essential for software management on Debian-based systems including Ubuntu, the most popular Linux distribution.
