I want my script to notify me when there are updates for my packages Is the a way to make apt-get give me the list of available updates but don't do anything more?

Best Answer


apt

For modern versions of apt there is a specific switch for this.

apt list --upgradable

apt-get

For the old apt-get command the -u switch shows a list of packages that are available for upgrade.

# apt-get -u upgrade --assume-no

From the apt-get man page .

-u
--show-upgraded
 Show upgraded packages; Print out a list of all packages that are to be upgraded. Configuration Item: APT::Get::Show-Upgraded.
--assume-no  Automatic "no" to all prompts. &lt== To prevent it from starting to install