GNU ELPA - system-packages


functions to manage system packages
system-packages-1.0.10.tar, 2018-Dec-15, 70.0kB
J. Alexander Branham <>
Home page
Browse ELPA's repository
CGit or Gitweb

To install this package, run in Emacs:

M-x package-install RET system-packages RET

Full description

#+TITLE: System Packages
#+AUTHOR: J. Alexander Branham

#+NAME: pipeline-status

This is a collection of functions to make handling installed system
packages more convenient through emacs. 

* Installation

  System packages is available on [[][MELPA]]. If you use [[][use-package]] and have
  MELPA set up correctly, all you'll need is something like the

  #+BEGIN_SRC emacs-lisp :eval never
    (use-package system-packages
      :ensure t)

* Configuration
  The package attempts to guess which package manager you use.  If it
  guesses wrong (or you'd like to set it manually), you may modify the
  variable =system-packages-package-manager=.

  We also attempt to guess whether or not to use sudo with appropriate
  commands (like installing and uninstalling packages). Some package
  managers (like homebrew) warn not to use sudo, others (like =apt=)
  need sudo privileges. You may set this manually by configuring

  Other package customization options can be accessed with M-x
  =customize-group RET system-packages RET=.

* Supported package managers
  Currently, =system-packages= knows about the following package managers.
  You can see exactly what commands are associated with =system-packages=
  commands by checking =system-packages-supported-package-managers=.  The
  default package manager that we use is the first one found from this

  - guix
  - nix
  - brew
  - macports
  - pacman
  - apt
  - aptitude
  - emerge
  - zypper
  - dnf
  - xbps

* Usage

  The package doesn't presume to set keybindings for you, so you may set
  those up yourself or simply call functions with =M-x=. All commands
  start with =system-packages=
* Adding other package managers
It is straightforward to add support for package managers.  First, add
the commands to =system-packages-supported-package-managers= like so:

#+BEGIN_SRC emacs-lisp
  (add-to-list 'system-packages-supported-package-managers
               '(pacaur .
                        ((default-sudo . nil)
                         (install . "pacaur -S")
                         (search . "pacaur -Ss")
                         (uninstall . "pacaur -Rs")
                         (update . "pacaur -Syu")
                         (clean-cache . "pacaur -Sc")
                         (log . "cat /var/log/pacman.log")
                         (get-info . "pacaur -Qi")
                         (get-info-remote . "pacaur -Si")
                         (list-files-provided-by . "pacaur -Ql")
                         (verify-all-packages . "pacaur -Qkk")
                         (verify-all-dependencies . "pacaur -Dk")
                         (remove-orphaned . "pacaur -Rns $(pacman -Qtdq)")
                         (list-installed-packages . "pacaur -Qe")
                         (list-installed-packages-all . "pacaur -Q")
                         (list-dependencies-of . "pacaur -Qi")
                         (noconfirm . "--noconfirm"))))

You may then need to adjust =system-packages-package-manager= and
=system-packages-use-sudo= accordingly:

#+BEGIN_SRC emacs-lisp
  (setq system-packages-use-sudo t)
  (setq system-packages-package-manager 'pacaur)
* See also
Helm users might like [[][helm-system-packages]]