ssh-apt-remove
Remove (or purge) one or more APT packages on a remote host
Skill by Nightreaver
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-remove
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.
About
Reviews
Write a reviewNo 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-remove
What's inside
- Skill name
ssh-apt-remove- Description
- Remove (or purge) one or more APT packages on a remote host
- License
- GPL-3.0
- Instructions
- 95 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- name: missing
Files (1)
- SKILL.md
SKILL.md (first lines)
# `ssh_apt_remove`
**Tier:** dangerous | **Group:** `pkg` | **Tags:** `{dangerous, group:pkg}`
Runs `apt-get -y remove -- <packages...>` on the remote host, or
`apt-get -y purge -- <packages...>` when `purge=True`. Requires root:
use a sudoers-enabled SSH account, or use `ssh_sudo_exec`. Hidden
unless `ALLOW_DANGEROUS_TOOLS=true`.
`remove` deletes the package binaries but leaves config files behind.
`purge` removes the config files too -- stronger, irreversible without
a backup. Pick `purge` when you want a clean slate; pick `remove` when
you may want to reinstall and keep tweaks intact.
## Inputs
| name | type | required | default | notes |
|---|---|---|---|---|
| `host` | str | yes | -- | Alias |
| `packages` | list[str] | yes | -- | One or more lowercase Debian package names; argv-validated |
| `purge` | bool | no | False | Also remove the package's config files |
| `timeout` | int | no | None | Per-call command timeout |
## Returns
```json
{
"host": "web01",
"action": "remove",
"packages": ["nginx"],
"exit_code": 0,
"stdout": "Reading package lists...\n...",
"stderr": "",
"duration_ms": 2134,
"stdout_truncated": false,
"output_warnings": []
}
```
`action` is `"remove"` or `"purge"` depending on the `purge` flag, so
audit consumers can tell which actually ran.
## When to call it
- Remove a package no longer needed; leftover config might be useful
for a future reinstall -- use `purge=False`.
- Fully decommission a package, including config under `/etc/<pkg>/`,
ahead of a clean reinstall -- use `purge=True`.
## When NOT to call it
- You want to also drop unused dependencies -- chase this call with
`ssh_apt_autoremove`.
- You want to keep the package but stop it -- use `ssh_systemctl_stop`
/ `ssh_systemctl_disable` instead.
- Removing a package other still-running services depend on -- check
with `ssh_apt_show` first.
## Examples
```python
# Remove nginx but keep its config files
ssh_apt_remove(host="web01", packages=["nginx"])
# Fully purge nginx and all its config
ssh_apt_remove(host="web01", packages=["nginx"], purge=True)
# Remove several at once
ssh_apt_remove(host="web01", packages=["apache2", "libapache2-mod-php"])
```
## Validation
Every package name must match `^[a-z0-9][a-z0-9.+-]{0,127}$` (Debian
package-name shape, lowercase only). Empty `packages=[]` is rejected
before any SSH I/O. The `--` separator before the package list
neutralises any would-be flag-shaped name.
## Common failures
- Empty `packages=[]` -- raises `ValueError`, no SSH call.
- `exit_code=1`, "Package ... is not installed" -- the package was not
installed; safe to ignore in idempotent flows.
- `stderr` reports dependency conflicts -- `apt-get -y remove` will
cascade the removal to anything that depends on the target; if that
cascade is too broad, abort and re-plan.
## Related
- `ssh_apt_install` -- the inverse
- `ssh_apt_autoremove` -- clean up orphan deps after a removal
- `ssh_apt_show` -- check `depends` / `recommends` before removing
- `ssh_systemctl_stop` / `_disable` -- often cleaner than removingFrom Nightreaver/python-ssh-mcp, GPL-3.0.
More from Nightreaver/python-ssh-mcp
- 0.529score
ssh-long-running-job
Nightreaver
Launch a multi-hour command in a detached tmux session, record it in host-notes, and poll for completion across sessions
SkillCFreshness: C★ 8Claude Code +9 - 0.529score
ssh-host-snapshot
Nightreaver
Capture a structured point-in-time inventory of a host (packages, systemd, network, storage, docker) for later diff or rollback reference
SkillCFreshness: C★ 8Claude Code +9 - 0.526score
ssh-apt-show
Nightreaver
Show combined apt-cache show + policy details for one package
SkillCFreshness: C★ 8Claude Code +9 - 0.526score
ssh-container-rollout
Nightreaver
Roll a single standalone Docker container to a new image tag with pre-pull, health verification, and rollback
SkillCFreshness: C★ 8Claude Code +9 - 0.526score
ssh-deploy-verify
Nightreaver
Upload an artifact, verify the remote hash, bring the stack up, and tail logs to confirm health
SkillCFreshness: C★ 8Claude Code +9 - 0.526score
ssh-docker-incident-response
Nightreaver
Diagnose a Docker container or compose stack that's failing, looping, or unresponsive
SkillCFreshness: C★ 8Claude Code +9 - 0.526score
ssh-host-healthcheck
Nightreaver
Standard "is this host OK right now" pass combining identity, alerts, disk, processes, and uptime
SkillCFreshness: C★ 8Claude Code +9 - 0.526score
ssh-disk-cleanup
Nightreaver
Investigate a disk-full host and recover space safely -- find before prune, never volume-prune from the LLM
SkillCFreshness: C★ 8Claude Code +9 - 0.526score
ssh-apt-list
Nightreaver
List APT packages on a remote host, filtered by mode and optional pattern
SkillCFreshness: C★ 8Claude Code +9 - 0.526score
ssh-integrity-audit
Nightreaver
Confirm a host's identity, file integrity, artifact signatures, and surface SUID / world-writable oddities
SkillCFreshness: C★ 8Claude Code +9 - 0.526score
ssh-verify-signature
Nightreaver
Verify the signature of a remote artifact (GPG, cosign, minisign) via ssh_exec_run
SkillCFreshness: C★ 8Claude Code +9 - 0.523score
ssh-incident-response
Nightreaver
Diagnose and recover an unresponsive SSH host
SkillCFreshness: C★ 8Claude Code +9
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
- Repository
- github.com/Nightreaver/python-ssh-mcp
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Nightreaver
- 0.529score
ssh-long-running-job
Nightreaver
Launch a multi-hour command in a detached tmux session, record it in host-notes, and poll for completion across sessions
SkillCFreshness: C★ 8Claude Code +9 - 0.529score
ssh-host-snapshot
Nightreaver
Capture a structured point-in-time inventory of a host (packages, systemd, network, storage, docker) for later diff or rollback reference
SkillCFreshness: C★ 8Claude Code +9 - 0.526score
ssh-apt-list
Nightreaver
List APT packages on a remote host, filtered by mode and optional pattern
SkillCFreshness: C★ 8Claude Code +9 - 0.526score
ssh-disk-cleanup
Nightreaver
Investigate a disk-full host and recover space safely -- find before prune, never volume-prune from the LLM
SkillCFreshness: C★ 8Claude Code +9 - 0.526score
ssh-container-rollout
Nightreaver
Roll a single standalone Docker container to a new image tag with pre-pull, health verification, and rollback
SkillCFreshness: C★ 8Claude Code +9 - 0.526score
ssh-apt-show
Nightreaver
Show combined apt-cache show + policy details for one package
SkillCFreshness: C★ 8Claude Code +9
Cite this page
ssh-apt-remove skill. Agent Mart. https://agentmart.dev/skills/nightreaver-ssh-apt-remove (last updated 2026-10-24)