Create local emacs package repository. 15 seconds to install 115 packages.
Emacs Lisp Shell
Latest commit dcadffd Sep 19, 2016 @redguardtoo fixed typo
Failed to load latest commit information. fixed typo Sep 19, 2016
elpa-mirror-pkg.el clean code v2.1.0 Sep 17, 2016
elpa-mirror.el clean code v2.1.0 Sep 17, 2016 clean code v2.1.0 Sep 17, 2016

elpa-mirror (v2.1.0)

Create local Emacs package repository.

Only installed packages will be included in the repository.

Please note console command tar and cp is required.


  • 15 seconds to install 115 packages
  • The repository could be hosted on USB/Dropbox/GitHub, so you can install packages behind corp firewall
  • Tested with Emacs 23.4, Emacs 24.3, Emacs 24.4, Emacs 24.5 on OSX/Cygwin/Windows/Linux


  • Download elpa-mirror.el to somewhere (say “~/.emacs.d/site-lisp/elpa-mirror”)
  • Add below code into your ~/.emacs,
(add-to-list 'load-path "~/.emacs.d/site-lisp/elpa-mirror")
(require 'elpa-mirror)

If you use native Windows Emacs, you need install Cygwin or MSYS2.


M-x elpamr-create-mirror-for-installed to create local repository.

To use the repository. Say it’s “~/myelpa”, insert below code into your ~/.emacs,

# myelpa is the ONLY repository now
(setq package-archives '(("myelpa" . "~/myelpa")))


Change output directory,

(setq elpamr-default-output-directory "~/myelpa")

Create repository in Shell

You don’t need even install elpa-mirror if running it in shell,

mkdir -p ~/myelpa && emacs --batch -l ~/.emacs.d/init.el -l ~/any-directory-you-prefer/elpa-mirror.el --eval='(setq elpamr-default-output-directory "~/myelpa")' --eval='(elpamr-create-mirror-for-installed)'

Repository on Dropbox

Insert below code into .emacs:

;; all-to-list will not override default elpa.
;; So now you have two repositories.
;; One is GNU elpa. Another is myelpa
(add-to-list 'package-archives
             '("myelpa" . ""))

Repository on GitHub

My repository is

Insert below code into .emacs:

(add-to-list 'package-archives
             '("myelpa" . ""))

Report bug