Artificial intelligent assistant

Can apt upgrade a package but only if it's already installed? Is there a way to use `apt` to apply a pending upgrade to a package, but do nothing if it's not installed? I have many Debian systems, all with different sets of packages, and I want to apply specific patches as they become available. I'd like to run the same command across all my systems _but_ without installing missing packages. Ordinarily I would use `apt-get install package` to do the upgrade, but this will install it where it's not already there. I could work around this with something along the lines of (dpkg -l package | grep '^ii') && apt-get install package but is there a better way?

I think you are looking for:


apt-get install --only-upgrade pkgname


`man apt-get` says:

>
> --only-upgrade
> Do not install new packages; when used in conjunction with
> install, only-upgrade will install upgrades for already
> installed packages only and ignore requests to install new
> packages. Configuration Item: APT::Get::Only-Upgrade.
>

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy b9edcec2b9b052b9ef1858be64e1746f