4

I am trying to update my Magit install.

The Magit manual has install instructions on https://magit.vc/manual/magit/Installing-from-an-Elpa-Archive.html#Installing-from-an-Elpa-Archive

M-x package-install does not list "magit":

minibuffer

M-x magit-version says "2.11.0".

M-x list-packages lists "magit 2.12.1": enter image description here

According to this post Install package: magit (via package.el) only shows *Completions* package-install is not a valid option if Magit is already installed.

How to update a Magit install?

I am running Spacemacs v.0.200.9

2 Answers 2

3

This is how I updated Magit on Spacemacs:

M-x magit-version says "2.11.0".

M-x package-install does not list "magit".

M-x list-packages lists "magit 2.12.1", mark it with 'i', then press 'x'.

M-x list-packages, click the "Package" header, lists "magit 2.11.0 obsolete": enter image description here

M-x magit-version now says "2.12.1", but the old Magit still runs.

M-x list-packages press '~', then press 'x' to delete old packages.

Restart Spacemacs.

Now the new version of Magit runs.

From list-packages manual on https://www.gnu.org/software/emacs/manual/html_node/emacs/Package-Menu.html

i   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.
~   Mark all obsolete packages for deletion with ‘D’.
x   Download and install all packages marked with ‘I’, and delete all packages marked with ‘D’.
2

I don't use package.el, so I had to look at the documentation.

To update a package (any package) first show the list of packages. Most package.el commands are invoked from that buffer, package-install being a notable exception that can be easily be memorized and invoked without using that buffer.

In that buffer navigate the the packages line and press u to mark it as one of the packages that you want to be updated. Once you are done marking packages, carry out the actions by pressing x.

Instead of marking one package after another, you can also mark all packages that can be updated by pressing U.

1
  • "magit" is not listed by either M-x package-install nor M-x package-install, because magit is already installed.
    – wolfv
    Jan 8, 2018 at 16:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.