← All guides

How to Monitor System Package Updates Available

Updated:

How to Monitor System Package Updates Available

Need to monitor system package updates available on your Linux server? Want to track available updates, check for security patches, and detect when updates are available? This guide shows you how to monitor package updates using built-in commands and automated monitoring with Zuzia.app.

For comprehensive update monitoring strategies, see System Update Monitoring. For troubleshooting update issues, see System Updates Breaking Services.

Why Monitoring Package Updates Matters

Package updates provide security patches, bug fixes, and new features. When updates are available but not applied, systems can become vulnerable to security threats, experience stability issues, and miss important improvements. Monitoring package updates helps you track available updates, prioritize security patches, plan update installations, and maintain system security and stability.

Method 1: Check Available Updates with APT

Check for available updates on Debian/Ubuntu systems:

List Available Updates

# Update package lists
sudo apt update

# List available updates
apt list --upgradable

# Count available updates
apt list --upgradable 2>/dev/null | wc -l

# Show update summary
apt list --upgradable 2>/dev/null | tail -n +2

Check Security Updates

# List security updates only
apt list --upgradable 2>/dev/null | grep -i security

# Count security updates
apt list --upgradable 2>/dev/null | grep -i security | wc -l

# View security update details
apt list --upgradable 2>/dev/null | grep -i security | head -10

Method 2: Check Available Updates with YUM/DNF

Check for available updates on Red Hat/CentOS systems:

List Available Updates

# Check for available updates
sudo yum check-update

# List updates
sudo yum list updates

# Count available updates
sudo yum check-update 2>/dev/null | wc -l

# Show update summary
sudo yum check-update 2>/dev/null | head -20

Check Security Updates

# Check for security updates only
sudo yum check-update --security

# List security updates
sudo yum list updates --security

# View security advisories
sudo yum updateinfo list security

# Check for critical security updates
sudo yum updateinfo list security | grep -i critical

Method 3: Monitor Update Availability

Monitor update availability over time to track update status:

Track Update Count

# Count available updates (APT)
apt list --upgradable 2>/dev/null | wc -l

# Count available updates (YUM)
sudo yum check-update 2>/dev/null | wc -l

# Track update count over time
echo "$(date): $(apt list --upgradable 2>/dev/null | wc -l) updates available" >> /var/log/updates.log

Check Last Update Check

# Check when package lists were last updated (APT)
stat /var/lib/apt/periodic/update-success-stamp | grep Modify

# Check last update time (YUM)
sudo yum history | head -5

# View update check history
grep "update" /var/log/apt/history.log | tail -5

Method 4: Automated Update Monitoring with Zuzia.app

Manual checks work while you are looking. To keep running them without you, Zuzia uses its agent and scheduled tasks.

How it works in Zuzia

  • Install the Zuzia agent on the server with one command. CPU, RAM, disk, load and network metrics start reporting on their own, with alerts on a threshold, on drift from the server's normal, or on a disk fill-up forecast.
  • Save the commands from this guide as a scheduled task and choose how often it runs, from every minute to once a year. The agent runs it on every host you pick.
  • If a command fails, you get an alert right away by email, Slack, Discord, push (through your Pushover account) or SMS (through your Vonage account).
  • The output of every run is kept, so you can look back at what changed. On paid plans, AI can read the output and alert you only when it spots a problem.

Setting it up

  1. Add the server in the Zuzia dashboard and install the agent.
  2. Create a scheduled task with the check commands below, then choose the hosts and how often it runs.
  3. Choose your notification channels. Turn on maintenance mode during planned work so it doesn't trigger alerts.

Custom Update Monitoring Commands

Add these commands as scheduled tasks:

# Check for available updates
apt list --upgradable 2>/dev/null | wc -l

# Check for security updates
apt list --upgradable 2>/dev/null | grep -i security | wc -l

# View update summary
apt list --upgradable 2>/dev/null | head -20

Best Practices

1. Monitor Updates Regularly

Check for updates every 6-12 hours. Use Zuzia.app for automated update monitoring. Prioritize security updates.

2. Prioritize Security Updates

Focus on security patches. Monitor security update availability daily. Apply security patches promptly.

3. Track Update Trends

Monitor update availability over time. Track update counts. Plan update installations based on trends.

Troubleshooting

Updates Not Detected

When updates are not detected:

  1. Update package lists: sudo apt update or sudo yum check-update
  2. Verify repository access: ping repository-server
  3. Check update logs: tail -20 /var/log/apt/history.log

Security Updates Available

When security updates are available:

  1. Review security updates: apt list --upgradable 2>/dev/null | grep -i security
  2. Plan update installation during maintenance window
  3. Test updates in staging if possible

FAQ

How often should I check for package updates?

For production servers, check for updates every 6-12 hours. Zuzia.app can check updates automatically and alert when updates are available.

What updates should I prioritize?

Prioritize security updates, especially critical security patches. Bug fixes and stability updates are also important.

Can Zuzia.app detect security updates automatically?

Yes, Zuzia.app can detect security updates by checking for available updates, filtering security patches, and alerting when security updates are available.

Related guides, recipes, and problems

We use cookies to ensure the proper functioning of our website.