Keep repository configuration unchanged and download the latest package indexes.
Do not update installed packages yet.
Which command is appropriate?
apt update downloads index information from configured sources. Package upgrades are a separate operation such as apt upgrade.
Detailed explanation
apt updateCorrect. apt update refreshes the local package indexes from configured repositories.
Correct. update refreshes the local package indexes.
apt upgradeIncorrect. apt upgrade updates installed packages using the indexes.
Incorrect. upgrade changes installed package files using the existing indexes.
apt installIncorrect. apt install requires a package name and performs installation.
Incorrect. install adds a named package and its dependencies.
apt edit-sourcesIncorrect. Editing sources changes repository configuration.
Incorrect. edit-sources changes repository configuration rather than downloading its metadata.
Try it yourself
An example you can run in a temporary verification environment.
apt --help | grep -E '^ update'Expected result
update - パッケージ情報を取得(表現はAPTの版・言語で異なる)Key points
- update refreshes indexes
- upgrade updates installed packages
- Sources define repositories
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
The index must be current before APT can make a reliable version decision; update itself does not install packages.
Check the side effect
Run update in a disposable environment and inspect the index timestamp without changing installed packages.