2

I added MELPA stable and MELPA repositories with

(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/"))

How can I remove one of them from the list so M-x package-list-packages does not show duplicate packages? Also, how could I print the list to see if the entry is really gone?

1
  • Why do you add it in the first place if you would not like to have the repository?
    – user227
    Aug 20, 2016 at 18:20

2 Answers 2

3

Press M-x RET customize-variable RET package-archives RET and you will be shown the customize options page for package archives where you can add or remove entries. After changing, click on State button and click on Save for future sessions.

1

The selected answer is correct and i like that it can be used to edit any variable in a visual way. For completion, I will say that, in this case, removing one of the lines with the form (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) from the .emacs file eventually removed its respective repository.

1
  • Yup, this is the more obvious answer, but I wrote my answer so that you would get to use customize options in emacs :) sometimes it's better than adding or removing entries in .emacs or init.el file. Aug 21, 2016 at 17:14

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.