Skip to main content

archlinux-manager

Utilities to configure and manage an ArchLinux system, usable either through an interactive text menu or scripted directly from the command line.

It distinguishes two kinds of actions:

  • Modifications install or remove a managed file/setting (e.g. a pacman cleanup hook, journald size limits, an xorg TearFree drop-in). Each can be reviewed against what is already on disk, confirmed, and written into place with sudo only when needed.
  • Tasks are operations the tool performs itself rather than configuring the system to do later (e.g. clearing the user cache directory).

Running interactively

With no subcommand it drops into an interactive menu:

$ archlinux-manager

Pick a category (Modifications or Tasks), then the specific action. Controls:

  • ↑/↓ (or j/k) to move
  • → or enter (or l) to select
  • ←, h, or esc to step back a level
  • q or ctrl-c to quit

For a modification you then choose apply (install) or remove (uninstall); the change is shown and confirmed before anything is written. A task runs as soon as you select it.

Running from the command line

Drive it non-interactively by passing a subcommand and one or more names (handy for scripts and keybinds). Every name is the CLI name shown by list.

Discovering names

list prints the exact name to pass for every modification and task (the CLI name, with its menu label beneath it):

$ archlinux-manager list
==> Modifications
  -> pacman_hook_paccache
     pacman hook to run paccache
  -> pacman_hook_uv_reinstall_tools_after_python_upgrade
     pacman hook to reinstall uv tools after a Python upgrade
  ...
==> Tasks
  -> clear_user_cache_dir
     Clear user cache dir
  -> update_mirrorlist_with_reflector_fast
     Update pacman mirrorlist with reflector (fast: top 30 by score)
  -> update_mirrorlist_with_reflector_full
     Update pacman mirrorlist with reflector (full: test all mirrors)

Applying a modification

This is the default operation — it installs the managed file(s)/setting:

$ archlinux-manager modification pacman_hook_paccache
$ archlinux-manager modification NAME [NAME ...]   # apply several at once

Removing a modification

Add --remove to uninstall instead of install:

$ archlinux-manager modification --remove pacman_hook_paccache
$ archlinux-manager modification --remove NAME [NAME ...]

Running a task

Tasks are actions the tool performs directly; just name them:

$ archlinux-manager task clear_user_cache_dir
$ archlinux-manager task NAME [NAME ...]           # run several at once

By default, applying/removing a modification still prompts you to review the change and confirm before writing (escalating with sudo as needed). Add --non-interactive to a modification to skip all review/confirm/sudo prompts (see scripting below).

Privileges — run as your user, not with sudo

Run the tool as your normal user. It does not run the Python process as root; instead it runs only the privileged file operations (install / unlink) under sudo, prompting for your password when a write actually needs it. This is the same model AUR helpers use, and it matters here:

  • Do not run sudo archlinux-manager. Doing so would execute the interpreter as root, which (a) writes root-owned __pycache__/*.pyc files into your user-installed tool environment, and (b) makes $HOME resolve to root's, so a task like Clear user cache dir would target the wrong cache.
  • Run as yourself and let the tool escalate per operation — no root-owned bytecode is ever created, and per-user paths stay correct.

Scripting it non-interactively

Because a scripted run can't answer a password prompt, authenticate sudo once up front so its timestamp is valid, then run with --non-interactive (which uses sudo -n and never prompts):

$ sudo -v                                       # cache sudo credentials
$ archlinux-manager modification --non-interactive \
      pacman_hook_paccache pacman_hook_uv_reinstall_tools_after_python_upgrade

Still run as your user (not via sudo) so the .pyc/$HOME issues above don't apply. For fully unattended use you can instead grant a NOPASSWD sudoers rule for /usr/bin/install and /usr/bin/unlink — note that this is effectively broad root access, so scope it carefully.

Options

-v / --verbose        Console log level INFO
-q / --quiet          Console log level ERROR (overrides -v)
--debug               Console log level DEBUG (overrides -v and -q)
--log-file FILE       Also write rotating logs to FILE
--color auto|always|never

Notes

  • Designed for ArchLinux; modifications write to system paths under /etc, /usr, /opt, and /etc/pacman.d/hooks, creating parent directories as needed.
  • The pacman-hook modifications are self-guarding: each hook does nothing if the program it drives isn't installed, and applying the modification warns (with the pacman -S command) when that program is missing.
  • Clear user cache dir resolves the cache via the XDG base directory spec ($XDG_CACHE_HOME, falling back to ~/.cache) and is best-effort: files in use by a running program are skipped with a warning rather than aborting.
  • Update pacman mirrorlist with reflector runs reflector as your user (it needs reflector installed — sudo pacman -S reflector), ranks the fastest current HTTPS mirrors, and writes /etc/pacman.d/mirrorlist via sudo. It does not filter by country (the fastest mirrors are chosen regardless of location). Two variants:
    • fast caps the candidates to the 30 best-scored mirrors before the speed test, so it finishes quickly.
    • full speed-tests every current HTTPS mirror — slower, but won't miss a nearby mirror that a score cap might exclude.

Metadata

Release files for archlinux-manager 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for archlinux-manager 1.0.0
File Size Uploaded Provenance Actions
archlinux_manager-1.0.0.tar.gz 17.3 kB With provenance Details for archlinux_manager-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for archlinux-manager 1.0.0
File Interpreter ABI Platform Actions
archlinux_manager-1.0.0-py3-none-any.whl Python 3 none any Details for archlinux_manager-1.0.0-py3-none-any.whl

Total release size: 40.6 kB

Release files / archlinux_manager-1.0.0.tar.gz

Download URL archlinux_manager-1.0.0.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1824d60a869d51f5e36fa134fc44c2b901ffd79c790c9a8ca3f5d22cd4a0816c
BLAKE2b-256 checksum
How to use checksums
3d018fdd4645b42fab293df2b770099222378f3575a9d42cfb5407f78f41d4da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 25, 2026.

Transparency log

Release files / archlinux_manager-1.0.0-py3-none-any.whl

Download URL archlinux_manager-1.0.0-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6720137f8042818ff98f2637b34ba8a24f5d84b2a4964a7e281fec8faa4ee448
BLAKE2b-256 checksum
How to use checksums
356a4e85747c828e1c454d1659468dff1dce94d3ebb6d3fbd31d6511de96fe42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 25, 2026.

Transparency log

Security for archlinux-manager 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for archlinux_manager-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page