repair

Repair broken APT and dpkg package state on Debian and Ubuntu hosts.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires apt, dpkg, sudo, lsof, fuser, and includes scripts (resource) components.

What problem does it solve?

Recover from interrupted package operations, half-configured dpkg state, broken dependencies, and APT lock contention that prevent installs or upgrades from finishing.

Core Features & Use Cases

  • Diagnose package health and dependency consistency to determine repair scope.
  • Finish pending dpkg configuration, run solver-driven fixes for broken dependencies, retry missing downloads for specific packages, and inspect lock owners without blindly removing lock files.
  • Use cases include interrupted CI/CD installs, failed local .deb installs, cloud image provisioning that was interrupted, and agents needing to restore package manager health before continuing other tasks.

Quick Start

Run the repair script with an action like check to diagnose package health by setting APT_REPAIR_ACTION=check and executing the scripts/repair-apt.sh script.

Frequently Asked Questions about repair

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

FAQPage Schema
How do I fix broken APT and dpkg package state after an interrupted install?

To fix broken APT and dpkg package state after an interrupted install, you can run a repair process that finishes pending dpkg configuration and uses the apt-get solver to resolve unmet dependencies.

What is the best way to repair unmet dependencies and half-configured packages on Debian?

The best way to repair unmet dependencies and half-configured packages on Debian is to run solver-driven apt-get fixes that automatically detect dependency inconsistencies and finish pending configuration.

Why does apt-get fail with lock contention and how can I inspect APT lock owners safely?

apt-get fails with lock contention when another process holds the lock; you can safely inspect APT lock owners using lsof or fuser instead of blindly removing lock files.

Can I run dpkg repair in noninteractive mode or simulate package fixes first?

Yes, you can run dpkg repair in noninteractive mode or simulate package fixes first by configuring specific environment variables before executing the repair script.

Does this APT repair tool support Ubuntu hosts and interrupted CI/CD package installations?

Yes, this APT repair tool supports Ubuntu hosts and interrupted CI/CD package installations by diagnosing package health, retrying missing downloads, and restoring package manager health.

What should I do if dpkg is not working due to failed local .deb installs?

If dpkg is not working due to failed local .deb installs, you should perform a diagnostic check to assess package health and then run solver fixes to complete the pending configuration.