Arch linux – Error during update of packages: jdk-openjdk and jre-openjdk are in conflict

When I try to update my system I get jdk-openjdk and jre-openjdk are in conflict error:

This is log of the update attempt:

:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Searching AUR for updates...
:: Searching databases for updates...
 -> Packages not in AUR: bunjs-bin  flite1-patched  jellyfin-server-bin  jellyfin-web-bin  js78  libgweather  libopenaptx  libvterm01  nodejs-lts-gallium  progsreiserfs  python-backcall
 -> Orphan (unmaintained) AUR Packages: anki-official-binary-bundle  jdk-jetbrains  jetbrains-clion-pj  python-gymnasium-notices  python-hijri-converter  python-jax-jumpy  python-pep517
 -> Flagged Out Of Date AUR Packages: anki-official-binary-bundle  blades-bin  logseq-desktop-wayland-bin  marp-cli  python-mypy-protobuf  steamcmd  vrms-arch
 -> gcc10: local (1:10.3.0-2) is newer than AUR (10.5.0-1)
 -> gcc10-libs: local (1:10.3.0-2) is newer than AUR (10.5.0-1)
:: 8 packages to upgrade/install.
8  extra/jdk-openjdk             21.u35-3     -> 21.u35-7
7  extra/jdk11-openjdk           11.0.21.u9-2 -> 11.0.21.u9-3
6  extra/jre-openjdk             21.u35-3     -> 21.u35-7
5  extra/jre-openjdk-headless    21.u35-3     -> 21.u35-7
4  extra/jre11-openjdk           11.0.21.u9-2 -> 11.0.21.u9-3
3  extra/jre11-openjdk-headless  11.0.21.u9-2 -> 11.0.21.u9-3
2  extra/jre17-openjdk           17.0.9.u8-1  -> 17.0.9.u8-2
1  extra/jre17-openjdk-headless  17.0.9.u8-1  -> 17.0.9.u8-2
==> Packages to exclude: (eg: "1 2 3", "1-3", "^4" or repo name)
 -> Excluding packages may cause partial upgrades and break systems
==>
Sync Dependency (4): jre11-openjdk-headless-11.0.21.u9-3, jre17-openjdk-headless-17.0.9.u8-2, jre-openjdk-headless-21.u35-7, jre11-openjdk-11.0.21.u9-3
Sync Explicit (4): jre17-openjdk-17.0.9.u8-2, jdk-openjdk-21.u35-7, jdk11-openjdk-11.0.21.u9-3, jre-openjdk-21.u35-7
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: jdk-openjdk and jre-openjdk are in conflict
 -> error installing repo packages

What is optimal way to resolve this conflict ?
Thank you for help


EDIT:
I tried sudo pacman -R jre-openjdk but I got this error:

checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing jre-openjdk breaks dependency 'jre21-openjdk=21.u35-3' required by jdk-openjdk

Read more here: Source link