The current directory contains example_1.0_amd64.deb.
Install this local archive with dpkg.
Which command is appropriate?
dpkg -i installs a local deb archive. It does not provide the repository-based dependency resolution performed by a higher-level APT command.
Detailed explanation
dpkg -i example_1.0_amd64.debCorrect. dpkg -i installs the specified local deb archive.
Correct. dpkg -i installs the specified local deb archive.
dpkg -r example_1.0_amd64.debIncorrect. -r removes an installed package.
Incorrect. -r removes an installed package.
dpkg -L example_1.0_amd64.debIncorrect. -L lists files belonging to an installed package.
Incorrect. -L lists files belonging to an installed package.
dpkg -S example_1.0_amd64.debIncorrect. -S searches which package owns a file.
Incorrect. -S searches which package owns a file.
Try it yourself
An example you can run in a temporary verification environment.
dpkg --help | grep -E -- '--install|-i' | head -n 1Expected result
インストール操作の説明。実際のパッケージ導入は行わないKey points
- -i installs a deb archive
- The argument is the archive file
- Dependencies may need separate resolution
Notes
- Environment: Debian系 / dpkg 1.22以降
- 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.