Skip to main content

pacman

pacman module

Manage packages with the pacman package manager. This module can install or remove packages on Arch Linux systems.

Examples

- name: Install a package
pacman:
name:
- nginx
state: present

- name: Install multiple packages
pacman:
name:
- git
- vim
- htop
state: present

- name: Remove a package
pacman:
name:
- apache
state: absent

Note: This module requires pacman to be installed and is designed for Arch Linux and Arch-based distributions.

Module Capabilities

  • Has Revert: true
  • Provides Variables: None

Inputs

ParameterTypeDescriptionRequiredDefaultChoices
name[string]List of package names to operate on.false
statestringDesired package state.falsepresentpresent, absent

Outputs

No outputs.