apt update has already completed.
Update currently installed packages to available newer candidate versions.
Which command is appropriate?
apt upgrade uses refreshed indexes to update installed packages. apt update itself only refreshes the indexes.
Detailed explanation
apt upgradeCorrect. apt upgrade updates installed packages using the current indexes.
Correct. upgrade applies available updates to installed packages.
apt updateIncorrect. apt update does not install new package versions.
Incorrect. update refreshes indexes but does not replace installed files.
apt listIncorrect. apt list displays package lists.
Incorrect. list displays package state.
apt search upgradeIncorrect. This searches for a package named upgrade.
Incorrect. search only finds names or descriptions.
Try it yourself
An example you can run in a temporary verification environment.
apt-get -s upgradeExpected result
更新計画が表示され、-sによりパッケージは変更されないKey points
- update and upgrade are separate
- Refresh indexes first
- -s can preview changes
Notes
- Environment: APT 2.x / シミュレーション
- Use a disposable environment or simulation before package changes.
- APT behavior can vary with repository configuration and package-manager version.
Foundation review
Place the operation
upgrade is the state-changing step; update only refreshes the information used to calculate candidates.
Check the side effect
Use a simulation or review the transaction summary before applying an upgrade.