On Thu, May 18, 2017 at 1:21 AM <egarrulo@gmail.com
<mailto:egarrulo@gmail.com>> wrote:
(defvar package-enable-at-startup nil)
(require 'package)
(add-to-list 'package-archives '("melpa-stable" .
"http://stable.melpa.org/packages/"))
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)
(setq package-user-dir (expand-file-name "~/elpa/"))
(package-initialize)
You need to setq the package-user-dir *before* calling (require
'package). Otherwise emacs will first create the elpa/ dir at the
default location at the time of requiring.
In addition, simply delete the archives/ dir inside package-user-dir;
emacs will just rebuild that from scratch without complaining.
Then finally restart emacs and then see if the issue gets resolved.