pacman - Package manager for Archlinux

Author:Afterburn

Synopsis

New in version 1.0.

Manages Archlinux packages

Options

parameter required default choices comments
name yes
    name of package to install, upgrade or remove.
    recurse no no
    • yes
    • no
    remove all not explicitly installed dependencies not required by other packages of the package to remove (added in Ansible 1.3)
    state no
    • installed
    • absent
    desired state of the package.
    update_cache no no
    • yes
    • no
    update the package database first (pacman -Syy).

    Examples


    # Install package foo
    - pacman: name=foo state=installed
    
    # Remove package foo
    - pacman: name=foo state=absent
    
    # Remove packages foo and bar
    - pacman: name=foo,bar state=absent
    
    # Recursively remove package baz
    - pacman: name=baz state=absent recurse=yes
    
    # Update the package database (pacman -Syy) and install bar (bar will be the updated if a newer version exists)
    - pacman: name=bar, state=installed, update_cache=yes
    

    Table Of Contents

    Previous topic

    opkg - Package manager for OpenWrt

    Next topic

    pip - Manages Python library dependencies.