3

Is there a command to update the apt-check results so I can use bash script to check them?

I run upgrade and it shows 0 but apt-check still shows 12 packages can be updated. How often is this suppose to update on its own? I have numerous servers. Some seem to update instantly. Others go days still showing updates are available when they aren't.

I have read that rebooting can reset it but thats silly. Why would you need to reboot to refresh a simple message especially when most updates do NOT require a reboot.

# apt-get update && apt-get upgrade
0 upgraded, 0 newly installed, 0 to remove
# /usr/lib/update-notifier/apt-check --human-readable
12 packages can be updated.
9 updates are security updates.
Kyle
  • 133
  • 5

1 Answers1

3

/usr/lib/update-notifier/apt-check --human-readable
Gives up to date information, no need to reboot

Because of the of apt upgrade some packages are not upgraded. Simply upgrade with dist-upgrade option

sudo apt-get update
sudo apt-get dist-upgrade

More information:
apt-get upgrade actually installs newer versions of the packages you have. After updating the lists, the package manager knows about available updates for the software you have installed. This is why you first want to update.
apt-get dist-upgrade, in addition to performing the function of apt-get upgrade, also intelligently handles changing dependencies with new versions of packages and will attempt to upgrade the most important packages at the expense of less important ones if necessary. Thus, the apt-get dist-upgrade command may actually remove some packages in rare but necessary instances.

Also on this post: https://askubuntu.com/a/81594/77093

cmak.fr
  • 8,696