Check Package Updates
ubuntu_check_updatesList pending apt updates on an Ubuntu server, highlight security patches, and report reboot status without installing packages.
Instructions
List pending apt package updates on an Ubuntu server, flag security updates, and report whether a reboot is required. Does NOT install anything.
Args:
server (string): server name from the inventory (see ubuntu_list_servers)
refresh_cache (boolean): run 'apt-get update' first via sudo -n for current results (default false)
limit (number): max packages to list, 1-200 (default 50)
response_format ('markdown' | 'json'): output format (default 'markdown')
Returns: total pending updates, security update count, reboot-required flag, and per-package old → new versions.
To actually install updates, use ubuntu_run_command with sudo, e.g. command='apt-get upgrade -y' sudo=true — after confirming with the user.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum packages to list | |
| server | Yes | Server name from the inventory (see ubuntu_list_servers) | |
| refresh_cache | No | Run 'sudo -n apt-get update' first so results are current (requires passwordless sudo). When false, results come from the last time the package cache was refreshed. | |
| response_format | No | 'markdown' for human-readable output, 'json' for machine-readable | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | ||
| total | Yes | ||
| server | Yes | ||
| has_more | Yes | ||
| packages | Yes | ||
| list_truncated | No | ||
| security_count | Yes | ||
| reboot_required | Yes | ||
| refresh_warning | No |