Skip to content

Latest commit

 

History

History
15 lines (7 loc) · 329 Bytes

File metadata and controls

15 lines (7 loc) · 329 Bytes

Linux Commands

Find if a package is installed

sudo dpkg-query --show --showformat='${db:Status-Status}\n' <pkg_name>

The command returns installed if the package exists, if not returns dpkg-query: no packages found matching <pkg_name>

Example: sudo dpkg-query --show --showformat='${db:Status-Status}\n' apache2