2

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.
  • sudo apt-get dist-upgrade will probably upgrade the 12 packages – cmak.fr Mar 8 '19 at 19:13
  • this seems to work. Can you post this as an answer instead of a comment? – Kyle Mar 9 '19 at 3:20
2

/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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.