ssh-apt-mark

Hold or unhold APT packages on remote hosts via SSH.

6|Updated Apr 17, 2026
One-click install
npx skills add https://github.com/Nightreaver/python-ssh-mcp --skill ssh-apt-mark
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ssh-apt-mark
Source: https://github.com/Nightreaver/python-ssh-mcp/tree/main/skills/ssh-apt-mark
Command: npx skills add https://github.com/Nightreaver/python-ssh-mcp --skill ssh-apt-mark

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the process of pinning or unpinning APT packages on remote hosts, reducing manual effort and improving configuration consistency.

Core Features & Use Cases

  • APT Package Management: Manage package versions and hold packages at their current version to prevent future upgrades.
  • Root Access Required: Only accessible with root privileges, ensuring controlled usage.
  • Use Case: Automate the process of pinning critical packages during software development or maintenance windows to maintain system stability.

Quick Start

Run ssh_apt_mark(host="web01", action="hold", packages=["nginx"]) to pin the nginx package at its current version on the 'web01' host.

Frequently Asked Questions about ssh-apt-mark

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

FAQPage Schema
How do I hold APT packages at their current version on a remote host?

To hold APT packages on a remote host, you can use a Skill that automates SSH access to run the apt-mark hold command. This requires root privileges and prevents future upgrades for the specified packages.

What is APT package pinning and when do I need it for remote Linux servers?

APT package pinning locks a package to its current version to prevent automatic upgrades. You need it for remote Linux servers during maintenance windows or development cycles to ensure system stability by avoiding unexpected version changes.

Do I need root privileges to manage package pinning on remote hosts via SSH?

Yes, root privileges are required to manage package pinning on remote hosts via SSH. The apt-mark command modifies system package states, necessitating elevated access to successfully execute hold or unhold actions.

How can I unhold APT packages on multiple remote Linux machines?

You can unhold APT packages on remote Linux machines by automating SSH access to execute the unhold action. This reverses the pinning, allowing the specified packages to be upgraded to newer versions again.

What is the best way to automate APT package management across SSH-connected hosts?

The best way to automate APT package management across SSH-connected hosts is using a dedicated Skill that programmatically issues hold or unhold commands. This ensures configuration consistency and reduces manual effort.

Why does unholding packages via SSH fail on my Linux server?

Unholding packages via SSH fails when the execution lacks root privileges. Modifying APT package states on a Linux server requires root access to successfully apply the unhold action to the target packages.