Variable: package-retention-policy

package-retention-policy is a customizable variable defined in package.el.gz.

Value

nil

Documentation

Policy for retaining old package installations after upgrades.

By default Emacs will activate the newest package, unless otherwise specified using package-load-list. If this user option is set to t, then no old packages are deleted. This might be useful if you wish to revert an upgrade. By setting this user option to a list you can also selectively list what packages and archives to retain. For the former, an entry of the form (archive STRING) will retain all packages from the archive STRING (see package-archives), and an entry of the form (package SYMBOL) will retain packages whose names match SYMBOL. If you prefix the list with a symbol not, the rules are inverted.

This variable was added, or its default value changed, in Emacs 31.1.

View in manual

Probably introduced at or before Emacs version 31.1.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/package.el.gz
(defcustom package-retention-policy nil
  "Policy for retaining old package installations after upgrades.
By default Emacs will activate the newest package, unless otherwise
specified using `package-load-list'.  If this user option is set to t,
then no old packages are deleted.  This might be useful if you wish to
revert an upgrade.  By setting this user option to a list you can also
selectively list what packages and archives to retain.  For the former,
an entry of the form (archive STRING) will retain all packages from the
archive STRING (see `package-archives'), and an entry of the
form (package SYMBOL) will retain packages whose names match SYMBOL.  If
you prefix the list with a symbol `not', the rules are inverted."
  :type package--policy-type
  :version "31.1")