Upgrade failed

How to solve this problem?

~> LC_ALL=C sudo zypper dup
Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories
 are compatible before you continue. See 'man zypper' for more information about this command.
Loading repository data...
Reading installed packages...
Computing distribution upgrade...

The following 5 packages are going to be REMOVED:
  apparmor-docs apparmor-parser autoyast2-installation hwdata libvolume_key1

5 packages to remove.
After the operation, 9.4 MiB will be freed.
**Continue? [y/n/...? shows all options] (y): **
(1/5) Removing apparmor-docs-2.13-3.1.noarch ...........................................................[error]
Removal of (64859)apparmor-docs-2.13-3.1.noarch(@System) failed:
Error: Subprocess failed. Error: RPM failed: error: package apparmor-docs-2.13-3.1.noarch is not installed

**Abort, retry, ignore? [a/r/i] (a): **i
(2/5) Removing apparmor-parser-2.13-3.1.x86_64 .........................................................[error]
Removal of (64861)apparmor-parser-2.13-3.1.x86_64(@System) failed:
Error: Subprocess failed. Error: RPM failed: error: package apparmor-parser-2.13-3.1.x86_64 is not installed

**Abort, retry, ignore? [a/r/i] (a): **i
(3/5) Removing autoyast2-installation-4.0.52-1.1.noarch ................................................[error]
Removal of (64884)autoyast2-installation-4.0.52-1.1.noarch(@System) failed:
Error: Subprocess failed. Error: RPM failed: error: package autoyast2-installation-4.0.52-1.1.noarch is not ins
talled

**Abort, retry, ignore? [a/r/i] (a): **i
(4/5) Removing hwdata-0.311-1.1.noarch .................................................................[error]
Removal of (65226)hwdata-0.311-1.1.noarch(@System) failed:
Error: Subprocess failed. Error: RPM failed: error: package hwdata-0.311-1.1.noarch is not installed

**Abort, retry, ignore? [a/r/i] (a): **i
(5/5) Removing libvolume_key1-0.3.9-2.1.x86_64 .........................................................[error]
Removal of (66513)libvolume_key1-0.3.9-2.1.x86_64(@System) failed:
Error: Subprocess failed. Error: RPM failed: error: package libvolume_key1-0.3.9-2.1.x86_64 is not installed

**Abort, retry, ignore? [a/r/i] (a): **i
~> LC_ALL=C cat /etc/os-release
NAME="openSUSE Tumbleweed"
# VERSION="20180516"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20180516"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20180516"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"


Show repositories

zypper ls
alex@linux-1fj7:~> LC_ALL=C zypper ls
# | Alias         | Name                                   | Enabled | GPG Check | Refresh | Type   
--+---------------+----------------------------------------+---------+-----------+---------+-------
1 | Google-Chrome | Google-Chrome                          | Yes     | (r ) Yes  | No      | rpm-md
2 | graphics      | Graphics Project (openSUSE_Tumbleweed) | Yes     | (r ) Yes  | Yes     | rpm-md
3 | packman       | packman                                | Yes     | (r ) Yes  | Yes     | rpm-md
4 | repo-debug    | openSUSE-Tumbleweed-Debug              | No      | ----      | ----    | NONE   
5 | repo-non-oss  | openSUSE-Tumbleweed-Non-Oss            | Yes     | (r ) Yes  | Yes     | rpm-md
6 | repo-oss      | openSUSE-Tumbleweed-Oss                | Yes     | (r ) Yes  | Yes     | rpm-md
7 | repo-source   | openSUSE-Tumbleweed-Source             | No      | ----      | ----    | NONE   
8 | repo-update   | openSUSE-Tumbleweed-Update             | Yes     | (r ) Yes  | Yes     | rpm-md


IMHO, this looks like either the rpm database or zypper’s cache of installed packages would be “broken”.

Try to run these commands:

sudo rpm --rebuilddb
sudo zypper clean -a

If that doesn’t help, try to explicitly reinstall the mentioned packages:

sudo zypper in -f apparmor-docs apparmor-parser autoyast2-installation hwdata libvolume_key1

“zypper ls” does not show the repositories.
That would be “zypper lr”.

But better provide all details, i.e. use “zypper lr -d”, a list of just names is pretty useless and doesn’t tell much.

Thank you all.
Resolved.

Yes zypper lr -d is more detailed and you can also see the url … I missed itlol!