how to check in a script if updates are available

Ralf Mardorf kde.lists at yahoo.com
Tue Mar 29 21:31:15 UTC 2022


On Tue, 29 Mar 2022 15:33:57 +0200, Oliver Grawert wrote:
>> But how can i check in a script if updates are available ?  
>
>you could likey craft something around "apt list --upgradeable"

I second that. However, if you dislike to use apt in a script, since it
warns that it should be used with caution in scripts, consider to use
apt-get with a simulation/dry-run/assume-no option instead of using
unattended-upgrades. Keep in mind that quite level 2 of apt-get assumes
yes, hence don't use it.




More information about the ubuntu-users mailing list