'Upgrade all packages of the system with eventual new versions.
Optionally, upgrade individual packages.
:param name: optional parameter wildcard spec to upgrade
:type name: str'

def upgrade(self, name=None):

    ud_command = 'update'
    ud_cmd = ((self.base_command + '    ') + ud_command)
    try:
        utils.system(ud_cmd)
    except error.CmdError:
        logging.error('Apt    package    update    failed')
    if name:
        up_command = 'install    --only-upgrade'
        up_cmd = '    '.join([self.base_command, self.dpkg_force_confdef, up_command, name])
    else:
        up_command = 'upgrade'
        up_cmd = '    '.join([self.base_command, self.dpkg_force_confdef, up_command])
    try:
        utils.system(up_cmd)
        return True
    except error.CmdError:
        return False
