Inspect nginx description, dependencies, download size, and candidate version before installing it.
Do not change package state.
Which command is appropriate?
apt show displays package metadata such as description, dependencies, size, and candidate information without installing it.
Detailed explanation
apt install nginxIncorrect. apt install starts an installation.
Incorrect. install begins dependency resolution and changes system state.
apt show nginxCorrect. apt show nginx displays the package record.
Correct. show reads the selected package record.
apt remove nginxIncorrect. apt remove deletes an installed package.
Incorrect. remove is a state-changing deletion.
apt update nginxIncorrect. apt update refreshes indexes rather than showing one package record.
Incorrect. update refreshes all configured indexes rather than showing one package record.
Try it yourself
An example you can run in a temporary verification environment.
apt show apt 2>/dev/null | sed -n '1,8p'Expected result
Package、Version、Priority、Sectionなどの項目Key points
- show displays details
- No package state change
- Dependencies and size are visible
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
A metadata query supports an installation decision without beginning the installation transaction.
Check the side effect
Compare show output with the transaction preview from a simulated install.