From the APT-known package list, display only packages currently installed.
A long description for individual packages is not needed.
Which command is appropriate?
apt list --installed filters the package list to installed packages. --upgradeable selects packages with available upgrades.
Detailed explanation
apt show --installedIncorrect. show is for details of specified package names, not this list filter.
Incorrect. show is for details of specified package names, not this list filter.
apt search --installedIncorrect. search expects a search term and is for candidate discovery.
Incorrect. search expects a search term and is for candidate discovery.
apt list --installedCorrect. apt list --installed lists installed packages.
Correct. apt list --installed lists installed packages.
apt update --installedIncorrect. apt update retrieves indexes and does not display the installed list.
Incorrect. apt update retrieves indexes and does not display the installed list.
Try it yourself
An example you can run in a temporary verification environment.
apt list --installed 2>/dev/null | sed -n '1,5p'Expected result
パッケージ名/スイート、版、アーキテクチャ、installed表示Key points
- list displays a list
- --installed filters installed items
- --upgradeable is different
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.