Add upgrade() method for upgrading packages