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. apt update refreshes the local package indexes from configured repositories.
apt upgradeIncorrect. apt upgrade updates installed packages using the indexes.
Incorrect. apt upgrade updates installed packages using the indexes.
apt installIncorrect. apt install requires a package name and performs installation.
Incorrect. apt install requires a package name and performs installation.
apt edit-sourcesIncorrect. Editing sources changes repository configuration.
Incorrect. Editing sources changes repository configuration.
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以降 / ヘルプ表示のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.