Add uninstall command #1

Open
opened 2026-04-03 13:57:12 +00:00 by sgcommand · 0 comments
Member

Add a unitdore uninstall command that removes all managed .service files from systemd.

Behaviour

  • Remove unit files for all units in config (or a named subset via args)
  • Run systemctl daemon-reload after removal
  • Optionally disable+stop units before removing (--stop flag)
  • Report what was removed vs already absent
  • Should handle both system units (/etc/systemd/system/) and user units (~/.config/systemd/user/)

Flags

  • --stop — disable and stop units before removing files
  • --all — remove all managed units regardless of enabled state
  • --dry-run — preview what would be removed
Add a `unitdore uninstall` command that removes all managed `.service` files from systemd. ## Behaviour - Remove unit files for all units in config (or a named subset via args) - Run `systemctl daemon-reload` after removal - Optionally disable+stop units before removing (`--stop` flag) - Report what was removed vs already absent - Should handle both system units (`/etc/systemd/system/`) and user units (`~/.config/systemd/user/`) ## Flags - `--stop` — disable and stop units before removing files - `--all` — remove all managed units regardless of enabled state - `--dry-run` — preview what would be removed
Sign in to join this conversation.