Packages and repositories
Ubuntu’s APT resolves packages from configured repositories, while dpkg records installed package state. apt update refreshes available-package metadata; it does not upgrade installed software. apt install changes the system and may run service setup. Read-only commands let you understand versions and sources before deciding whether a change is needed. Use dpkg -s bash and apt-cache policy bash to compare installed package metadata with available repository candidates without changing the machine. Inspecting package state first distinguishes an absent executable from a service configuration problem and prevents unnecessary reinstalls during troubleshooting of an otherwise healthy dependency. Treating apt update as an installed-software upgrade misunderstands metadata refresh; inspect the command’s purpose and plan actual upgrades separately with their operational impact.
Use dpkg -s bash and apt-cache policy bash to compare installed package metadata with available repository candidates without changing the machine.
Inspecting package state first distinguishes an absent executable from a service configuration problem and prevents unnecessary reinstalls during troubleshooting of an otherwise healthy dependency.
Treating apt update as an installed-software upgrade misunderstands metadata refresh; inspect the command’s purpose and plan actual upgrades separately with their operational impact.