upgrade

Automate Debian and Ubuntu package upgrades with apt-get commands.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/theslashdojo/dojo --skill upgrade-theslashdojo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: upgrade
Source: https://github.com/theslashdojo/dojo/tree/main/nodes/apt/upgrade
Command: npx skills add https://github.com/theslashdojo/dojo --skill upgrade-theslashdojo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill automates system maintenance for Debian and Ubuntu hosts by refreshing package metadata, applying upgrades, and cleaning caches to prevent drift during patching and image preparation.

Core Features & Use Cases

  • Refresh metadata with apt-get update prior to upgrades.
  • Apply upgrades and dist-upgrades to satisfy dependency changes.
  • Clean caches and remove unneeded packages to keep systems lean.
  • Inspect kept-back packages and phased-update indicators to plan safe updates.

Quick Start

Execute a patch cycle by updating apt indexes and applying upgrades.

Frequently Asked Questions about upgrade

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate apt-get upgrade and cleanup tasks on Ubuntu?

Automate apt upgrades and cleanup on Ubuntu by executing a script-based entrypoint that refreshes apt metadata, applies upgrades, and cleans caches. Use environment controls like APT_UPGRADE_ACTION and APT_ASSUME_YES to guide the automation without manual prompts.

What is the difference between apt upgrade and dist-upgrade for package maintenance?

Apt upgrade installs new package versions, while dist-upgrade handles dependency changes and installs new packages when resolving upgrades. The script supports both actions via the APT_UPGRADE_ACTION environment variable to satisfy dependency changes during patching.

Can I simulate apt upgrades without making changes to the system?

Yes, you can simulate apt upgrades without making changes by enabling the APT_SIMULATE environment variable. This allows you to inspect what packages would be installed, upgraded, or removed before applying any actual modifications to the host.

How do I clean apt caches and remove unneeded packages after a dist-upgrade?

Clean apt caches and remove unneeded packages after a dist-upgrade by running the autoremove, autoclean, and clean actions. The script supports these maintenance tasks to remove orphaned dependencies and clear cached package files, keeping systems lean.

When do I need to inspect kept-back packages during an apt update?

Inspect kept-back packages during an apt update when packages are held due to dependency conflicts or phased updates. The script exposes indicators for kept-back and phased-update status to help you plan safe updates and avoid incomplete upgrades.

Does this apt upgrade script work for both host patching and image preparation?

Yes, the apt upgrade script works for both host patching and image preparation workflows. It refreshes metadata, applies upgrades, and cleans caches to prevent drift, making it suitable for ongoing maintenance and building clean system images.