Skip to content
Agentmart
Submit a tool

ssh-apt-mark

Hold or unhold APT packages on a remote host (pin / unpin)

Skill by Nightreaver

IndexedGPL-3.0★ 8
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/nightreaver-ssh-apt-mark

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Hold or unhold APT packages on a remote host (pin / unpin)

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/ssh-apt-mark

What's inside

Skill name
ssh-apt-mark
Description
Hold or unhold APT packages on a remote host (pin / unpin)
License
GPL-3.0
Instructions
86 lines in SKILL.md · view on GitHub

Agent Skills spec issues

  • name: missing

Files (1)

  • SKILL.md

SKILL.md (first lines)

# `ssh_apt_mark`

**Tier:** dangerous | **Group:** `pkg` | **Tags:** `{dangerous, group:pkg}`

Runs `apt-mark hold|unhold -- <packages...>` on the remote host. Requires
root. Hidden unless `ALLOW_DANGEROUS_TOOLS=true`. For the read-only
`showhold` variant use the sibling tool [`ssh_apt_show_holds`](../ssh-apt-show-holds/SKILL.md).

- `hold`: pin packages at their current version so future upgrades skip
  them.
- `unhold`: undo a previous hold.

## Inputs

| name | type | required | default | notes |
|---|---|---|---|---|
| `host` | str | yes | -- | Alias |
| `action` | `"hold" \| "unhold"` | yes | -- | Mutation verb |
| `packages` | list[str] | yes | -- | Non-empty; one Debian package name per entry |
| `timeout` | int | no | None | Per-call command timeout |

## Returns -- `AptMutationResult`

```json
{
  "host": "web01",
  "action": "hold",
  "packages": ["nginx"],
  "exit_code": 0,
  "stdout": "nginx set on hold.\n",
  "stderr": "",
  "duration_ms": 187,
  "stdout_truncated": false,
  "output_warnings": []
}
```

## When to call it

- `hold`: keep a package frozen across `ssh_apt_upgrade` sweeps --
  pinning a kernel or a vendor-specific build.
- `unhold`: ready a previously-held package for the next upgrade.

To inventory currently-held packages, call [`ssh_apt_show_holds`](../ssh-apt-show-holds/SKILL.md)
instead -- separate read-tier tool, no root required.

## When NOT to call it

- You want to remove a package entirely -- use `ssh_apt_remove`.
- You want to downgrade or jump to a specific version -- `apt-mark`
  pins to whatever is currently installed; use `ssh_apt_install` with
  an explicit version specifier (or `ssh_exec_run`) for surgical
  version control.

## Examples

```python
# Pin nginx at its current version
ssh_apt_mark(host="web01", action="hold", packages=["nginx"])

# Release the pin
ssh_apt_mark(host="web01", action="unhold", packages=["nginx"])
```

## Validation

`action` is constrained at the FastMCP layer to `hold` | `unhold`.
`packages` MUST be non-empty -- raises `ValueError` before any SSH I/O.
Each name is validated against the Debian package-name shape
`^[a-z0-9][a-z0-9.+-]{0,127}$`.

## Common failures

- Empty `packages` -- `ValueError`, no SSH call.
- `hold` succeeds but `ssh_apt_upgrade` still upgrades the package --
  another tool (Salt, Ansible, snapd) may also be touching apt's hold
  state; check with `ssh_apt_show_holds`.

## Related

- [`ssh_apt_show_holds`](../ssh-apt-show-holds/SKILL.md) -- read-only counterpart
- `ssh_apt_install` -- can override a hold with `--force` (not exposed)
- `ssh_apt_upgrade` -- the operation that respects holds
- `ssh_apt_list` with `mode="upgradable"` -- preview what is held back

From Nightreaver/python-ssh-mcp, GPL-3.0.

More from Nightreaver/python-ssh-mcp

Signals

Stars
8
Forks
0
Open issues
0
Last commit (this folder)
Jun 1, 2026 (5 months ago)
Last release
Jun 2, 2026 (4 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
GPL-3.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Nightreaver

Cite this page

ssh-apt-mark skill. Agent Mart. https://agentmart.dev/skills/nightreaver-ssh-apt-mark (last updated 2026-10-24)