The command M-x list-packages brings up the package menu. This is a buffer listing all the packages that Emacs knows about, one on each line, with the following information:
list-packages command accesses the network, to retrieve the
list of available packages from package archive servers. If the
network is unavailable, it falls back on the most recently retrieved
The main command to use in the package list buffer is the x command. If the package under point isn’t installed already, this command will install it. If the package under point is already installed, this command will delete it.
The following commands are available in the package menu:
Print a short message summarizing how to use the package menu
Display a help buffer for the package on the current line
package-menu-describe-package), similar to the help window
displayed by the C-h P command (see Emacs Lisp Packages).
Mark the package on the current line for installation
package-menu-mark-install). If the package status is
‘available’, this adds an ‘I’ character to the start of the
line; typing x (see below) will download and install the
Mark the package on the current line for deletion
package-menu-mark-delete). If the package status is
‘installed’, this adds a ‘D’ character to the start of the
line; typing x (see below) will delete the package.
See Package Files and Directory Layout, for information about what package deletion
Open the package website on the current line in a browser
browse-url is used to open the
Mark all obsolete packages for deletion
package-menu-mark-obsolete-for-deletion). This marks for
deletion all the packages whose status is ‘obsolete’.
Remove any installation or deletion mark previously added to the
current line by an i or d command
Mark all package with a newer available version for upgrading
package-menu-mark-upgrades). This places an installation mark
on the new available versions, and a deletion mark on the old
installed versions (marked with status ‘obsolete’). By default,
this won’t mark built-in packages for which a newer version is
available, but customizing
change that. See Package Installation. If you customize
package-install-upgrade-built-in to a non-
nil value, be
sure to review all the built-in packages the U command marks, to
avoid updating built-in packages you don’t want to overwrite.
Download and install all packages marked with i, and their
dependencies; also, delete all packages marked with d
package-menu-execute). This also removes the marks. If no
packages are marked, this command will install the package under point
(if it isn’t installed already), or delete the package under point (if
it’s already installed).
Refresh the package list (
revert-buffer). This fetches the
list of available packages from the package archive again, and
redisplays the package list.
Hide packages whose names match a regexp
package-menu-hide-package). This prompts for a regexp, and
then hides the packages with matching names. The default value of the
regexp will hide only the package whose name is at point, so just
pressing RET to the prompt will hide the current package.
Toggle visibility of old versions of packages and also of versions
from lower-priority archives (
Filter package list by archive (
This prompts for a package archive (e.g., ‘gnu’), then shows only
packages from that archive. You can specify several archives by
typing their names separated by commas.
Filter package list by description
package-menu-filter-by-description). This prompts for a
regular expression, then shows only packages with descriptions
matching that regexp.
Filter package list by keyword (
This prompts for a keyword (e.g., ‘games’), then shows only
packages with that keyword. You can specify several keywords by
typing them separated by commas.
Filter package list by name or description
package-menu-filter-by-name-or-description). This prompts for
a regular expression, then shows only packages with a name or
description matching that regexp.
Filter package list by name (
This prompts for a regular expression, then shows only packages
with names matching that regexp.
Filter package list by status (
This prompts for one or more statuses (e.g., ‘available’,
see Package Statuses), then shows only packages with matching
status. You can specify several status values by typing them
separated by commas.
Filter package list by version (
This prompts first for one of the comparison symbols ‘<’,
‘>’ or ‘=’ and for a version string, and then shows packages
whose versions are correspondingly lower, equal or higher than the
version you typed.
Filter package list by non-empty mark (
This shows only the packages that have been marked to be installed or deleted.
Filter package list to show only packages for which there are
available upgrades (
default, this filter excludes the built-in packages for which a newer
version is available, but customizing
package-install-upgrade-built-in can change that.
See Package Installation.
Clear filter currently applied to the package list
For example, you can install a package by typing i on the line listing that package, followed by x.