Mark all upgradable packages in the Package Menu.
For each installed package with a newer version available, place
an (I)nstall flag on the available version and a (D)elete flag on
the installed version. A subsequent M-x package-menu-execute
call will upgrade the package.