Ubuntu - dpkg - Check if a package is installed or not

sudo dpkg -s [package name]
 
or
 
sudo dpkg -s [package name] | grep Status

Example

dpkg -s lsof | grep Status

returns:

Status: install ok installed