You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The command to get the number of pending updates on yum based systems is yum check-update --quiet | grep '^[a-Z0-9]' | wc -l. CentOS/RHEL have no apt package manager.
The text was updated successfully, but these errors were encountered:
@otherguy I checked the command on brand-new Fedora installation, and noticed that it checks for updates instead of only listing them. After reading some manpages, I ended up with this command:
yum list updates --cacheonly --noplugins
The problem is that it will only work after initial cache has been built, thus leading to my question to you: Does yum-based distributions automatically update that said cache? Asking because I rarely used another distribution other than Debian on my servers, and I know it periodically updates it.
The point of using this other command, is that howe should return as soon as possible (since we're running as a MOTD), and waiting for yum to download repository information may block for too long.
Fair point and fine for my use case. I’m using yum-cron to regularly update that cache. I assume you have something similar for Debian because by default it also doesn’t update the cache periodically (unattended-upgrades or similar).
Personally I also use Debian but at work we have RHEL.
The command to get the number of pending updates on
yum
based systems isyum check-update --quiet | grep '^[a-Z0-9]' | wc -l
. CentOS/RHEL have noapt
package manager.The text was updated successfully, but these errors were encountered: