Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9276867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:57:22+00:00 2026-06-18T16:57:22+00:00

I have the following setup for packages (not sure if there is a better

  • 0

I have the following setup for packages (not sure if there is a better recommended one):

(require 'package)
(setq package-archives '(("ELPA" . "http://tromey.com/elpa/") 
                          ("gnu" . "http://elpa.gnu.org/packages/")
                          ("marmalade" . "http://marmalade-repo.org/packages/")))

; Apparently needed for the package auto-complete (why?)
(add-to-list 'package-archives
             '("melpa" . "http://melpa.milkbox.net/packages/") t)

(package-initialize)
(setq url-http-attempt-keepalives nil)

I have three questions related to the installation and updating of packages.

Q1. Is there a way to update the list of available packages (and most recent versions) and update a specific package?

Q.2 What is the difference between the following package sources?:

  • ELPA,
  • GNU
  • marmalade
  • melpa

Q.3 Does it matter the order in which they are added to package-archives?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T16:57:23+00:00Added an answer on June 18, 2026 at 4:57 pm
    1. In order to automatically update the list of packages, only if there is no package list already, use the following:

      (when (not package-archive-contents)
          (package-refresh-contents))
      

      In order to update all installed packages, type package-list-packages, which will take you to the *Packages* buffer (and also update the list of packages), and then type U x.

      package-refresh-contents unconditionally tries to download a package list from all repos you’ve added to package-archives; package-archive-contents is non nil if you have already downloaded the package list.

    2. ELPA is the original. I don’t think it’s really maintained anymore, but I’m not sure. I don’t use it.

      GNU is "official". It’s maintained along with Emacs, which means things should always work but updates and new packages don’t come very often.

      Marmalade is basically a website where you can upload a complete package, and it will be added to the marmalade repo. You don’t just submit a link to the package’s upstream, and it doesn’t quite automate the creation of the package completely. I think this is the Right Thing, because you don’t necessarily want to track upstream. Unfortunately, it has been unmaintained for a while, but someone recently took it over so it should be back and better at some point.

      Melpa takes a URL to e.g. the EmacsWiki lisp area or a github repo, and builds a package automatically from it. Thus it is usually at most a day behind whatever it is tracking. Although it tracks upstream, I’ve never had a problem in practice, and this is where most of my packages are from. There is also Melpa Stable, which is like Melpa but grabs tagged revisions of the upstream repo instead of the latest revision. Melpa stable has fewer packages than Melpa. Probably Melpa should be preferred over Melpa Stable.

      Org mode has its own package.el repo (http://orgmode.org/elpa/).

      All of the package repos work the same, you just add them to your package-archives.

      Here’s a more in-depth blog post about this subject, which I mostly agree with.

    3. I’m not sure, but I think if a package is duplicated in different repos, the order the repos appear in in package-archives determines precedence. I don’t know if higher precedence is at the beginning or end of the list.

    Update: In Emacs 25, there is a variable package-archive-priorities that you can use to prioritize your package repos (e.g. prefer ELPA over MELPA).


    Here is the relevant section of my init.el, if you’re interested:

    (setq jpk-packages
          '(
            ac-dabbrev
            ...
            yasnippet
            ))
    
    (package-initialize)
    (add-to-list 'package-archives
                 '("melpa" . "http://melpa.org/packages/"))
    (add-to-list 'package-archives
                 '("org" . "http://orgmode.org/elpa/"))
    
    ;; install any packages in jpk-packages, if they are not installed already
    (let ((refreshed nil))
      (when (not package-archive-contents)
        (package-refresh-contents)
        (setq refreshed t))
      (dolist (pkg jpk-packages)
        (when (and (not (package-installed-p pkg))
                 (assoc pkg package-archive-contents))
          (unless refreshed
            (package-refresh-contents)
            (setq refreshed t))
          (package-install pkg))))
    
    (defun package-list-unaccounted-packages ()
      "Like `package-list-packages', but shows only the packages that
      are installed and are not in `jpk-packages'.  Useful for
      cleaning out unwanted packages."
      (interactive)
      (package-show-package-list
       (remove-if-not (lambda (x) (and (not (memq x jpk-packages))
                                (not (package-built-in-p x))
                                (package-installed-p x)))
                      (mapcar 'car package-archive-contents))))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following setup, but when I put 1024 and replace all 512 with
I have following models setup in my Django application class School(models.Model): name = models.TextField()
I have the following setup: Table: Question QuestionId Table: QuestionTag QuestionId TagId Table: Tag
I have the following setup, and I need to know how to persist state.
I have the following setup, and the empty view text doesn't show up... protected
I have the following setup: eclipse a standard Java project (A) an eclipse plugin
I have this following setup, a textarea named with some data in it that
I have the following setup: Web.config has customErrors mode=Off Global.Application_Error() event calls a custom
I have the following setup in Oracle, i.e.: (‘aXYZApple-Au’, ‘aXYZOrange-Au’,’aXYZApple-Readonly’,’aXYZOrange-Write’, ’aXYZApple-Write’, ’aXYZOrange-Read’) What I
I have the following setup. The folder itext is in the top level in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.