4 Commands for Checking If a Package is Installed in Ubuntu and Debian

In this article I will show you 4 ways to verify if a package is installed or not, in Debian, Ubuntu, Linux Mint, Knoppix and other Debian Based distros.

Watch Free Movies

1. With aptitute:

$ aptitude show vim | grep -i state
State: installed

2-3. With dpkg:

$ dpkg -s vim | grep -i status
Status: install ok installed

$ dpkg -l | grep vim
ii vim 2:7.3.154+hg~74503f6ee649-2ubuntu3.1 Vi IMproved - enhanced vi editor
ii vim-common 2:7.3.154+hg~74503f6ee649-2ubuntu3.1 Vi IMproved - Common files
ii vim-runtime 2:7.3.154+hg~74503f6ee649-2ubuntu3.1 Vi IMproved - Runtime files
ii vim-tiny 2:7.3.154+hg~74503f6ee649-2ubuntu3.1 Vi IMproved - enhanced vi editor - compact version

4. With Apt package manager:

$ apt-cache policy vim | grep -i installed
Installed: 2:7.3.154+hg~74503f6ee649-2ubuntu3.1

Scroll to Top