The following is now part of the Paradox package. Just invoke
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