Upgrading odk central form v2022.3. to 2023.2

I am trying to upgrade ODK Central from version 2022.3 to version 2023.2 but it throws an error when I execute docker compose build. The error is
Problem executing scripts APT::Update::Post-Invoke 'rm -f /var/cache/apt/archives/.deb /var/cache/apt/archives/partial/.deb /var/cache/apt/*.bin || true'
executor failed running [/bin/sh -c apt-get update && apt-get install -y netcat-openbsd]: exit code: 100, and this happens when it gets to nginx

Problem resolved after apt upgrade