How to find out if a package is installed in Ubuntu

Last updated on | one reply

To find out if a particular package is already installed in Ubuntu, we can use the dpkg package manager.

dpkg -l package-name

Change package-name to the name of your package. For example, if you want to check if the nano editor is installed.

dpkg -l nano

If the package nano is installed, the result should be:

| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                       Version            Architecture       Description
ii  nano                       2.5.3-2ubuntu1     amd64              small, friendly text editor inspired by Pico

If the package is not installed, the result will be:

dpkg-query: no packages found matching nano

Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.

1 reply

Leave a reply

Your email address will not be published. Required fields are marked *