code: def upgrade(self):
          
          for pkg in self.upgrade_all:
              check_md5(pkg_checksum(pkg, "slack_patches"), self.patch_path + pkg)
              pkg_ver = "{0}-{1}".format(split_package(pkg)[0],
                                         split_package(pkg)[1])
              if find_package(split_package(pkg)[0] + self.meta.sp,
                              self.meta.pkg_path):
                  print("[ {0}upgrading{1} ] --> {2}".format(
                      self.meta.color["YELLOW"], self.meta.color["ENDC"],
                      pkg[:-4]))
                  PackageManager((self.patch_path + pkg).split()).upgrade(
                      "--install-new")
                  self.upgraded.append(pkg_ver)
              else:
                  print("[ {0}installing{1} ] --> {2}".format(
                      self.meta.color["GREEN"], self.meta.color["ENDC"],
                      pkg[:-4]))
                  PackageManager((self.patch_path + pkg).split()).upgrade(
                      "--install-new")
                  self.installed.append(pkg_ver)
docs: Upgrade packages