Automatically update packages and delete old versions

http://emacs.stackexchange.com/questions/4045/automatically-update-packages-and-delete-old-versions

The following is now part of the Paradox package. Just invoke paradox-upgrade-packages.


This should do it.

(defun endless/upgrade ()
  "Upgrade all packages, no questions asked."
  (interactive)
  (save-window-excursion
    (list-packages)
    (package-menu-mark-upgrades)
    (package-menu-execute 'no-query)))

Just check which function is called by each of the steps you enumerated, and throw them inside an interactive function. Normally, the (y or n) prompts would be an issue, but package-menu-executeconveniently takes a NO-QUERY argument.

shareimprove this answer
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s