code: def delete_package(self, cache, pkg):
          
          if self.is_virtual_package(pkg):
              log("Package '%s' appears to be virtual - purging provides" %
                  pkg.name, level=DEBUG)
              for _p in pkg.provides_list:
                  self.delete_package(cache, _p[2].parent_pkg)
          elif not pkg.current_ver:
              log("Package '%s' not installed" % pkg.name, level=DEBUG)
              return
          else:
              log("Purging package '%s'" % pkg.name, level=DEBUG)
              apt_purge(pkg.name)
docs: Deletes the package from the system.
  
          Deletes the package form the system, properly handling virtual
          packages.
  
          :param cache: the apt cache
          :param pkg: the package to remove