Recreate repositories package lists

def command_upgrade(self):
        """Recreate repositories package lists
        """
        if len(self.args) == 1 and self.args[0] == "upgrade":
            Initialization(False).upgrade(only="")
        elif (len(self.args) == 2 and self.args[0] == "upgrade" and
                self.args[1].startswith("--only=")):
            repos = self.args[1].split("=")[-1].split(",")
            for rp in repos:
                if rp not in self.meta.repositories:
                    repos.remove(rp)
            Initialization(False).upgrade(repos)
        else:
            usage("")