A package-managed Tomcat upgrade on Ubuntu is safest when the package change, configuration files, and application smoke test are handled as one maintenance window. APT can replace the Tomcat packages without removing local web applications, but the restarted service can still expose config merge mistakes, a Java runtime change, or an application that no longer starts cleanly.
Ubuntu 26.04 packages Apache Tomcat as tomcat10, with tomcat10-common and libtomcat10-java providing the shared files and libraries. Optional packages such as tomcat10-admin should be upgraded in the same change window when they are installed, so the Manager web application and the server package stay on matching revisions.
A package update within the same Tomcat line is different from migrating from Tomcat 9 to Tomcat 10 or from Tomcat 10 to Tomcat 11. Read the Apache migration notes before a major-version move, back up /etc/tomcat10 and deployed web applications before changing packages, and keep the normal application rollback path ready before returning traffic.
Steps to upgrade Tomcat on Ubuntu:
- List the installed core Tomcat package versions.
$ dpkg-query -W tomcat10 tomcat10-common libtomcat10-java libtomcat10-java 10.1.40-1ubuntu1 tomcat10 10.1.40-1ubuntu1 tomcat10-common 10.1.40-1ubuntu1
Add optional installed packages, such as tomcat10-admin, to the package checks and upgrade command when the host uses them.
- Refresh the APT package metadata.
$ sudo apt update Hit:1 http://archive.ubuntu.com/ubuntu resolute InRelease Get:2 http://security.ubuntu.com/ubuntu resolute-security InRelease [137 kB] Get:3 http://archive.ubuntu.com/ubuntu resolute-updates InRelease [137 kB] ##### snipped ##### 3 packages can be upgraded. Run 'apt list --upgradable' to see them.
- Check the installed and candidate Tomcat package versions.
$ apt-cache policy tomcat10 tomcat10: Installed: 10.1.40-1ubuntu1 Candidate: 10.1.40-1ubuntu1.26.04.1 Version table: 10.1.40-1ubuntu1.26.04.1 500 500 http://archive.ubuntu.com/ubuntu resolute-updates/universe arm64 Packages 500 http://security.ubuntu.com/ubuntu resolute-security/universe arm64 Packages *** 10.1.40-1ubuntu1 500 500 http://archive.ubuntu.com/ubuntu resolute/universe arm64 PackagesStop and review the Apache migration notes when the candidate changes the major Tomcat line instead of applying an ordinary package update inside the same line.
- Back up the Tomcat configuration and deployed web applications.
$ sudo tar -C / -czf /root/tomcat-pre-upgrade.tar.gz etc/tomcat10 var/lib/tomcat10/webapps
Add application data, external content directories, keystores, and reverse-proxy configuration when the deployed application depends on files outside these package-managed paths.
- Upgrade the Tomcat package set.
$ sudo apt install --only-upgrade tomcat10 tomcat10-common tomcat10-admin libtomcat10-java Reading package lists... Building dependency tree... Reading state information... Solving dependencies... The following packages will be upgraded: libtomcat10-java tomcat10 tomcat10-admin tomcat10-common 4 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. Need to get 6536 kB of archives. ##### snipped ##### Unpacking tomcat10 (10.1.40-1ubuntu1.26.04.1) over (10.1.40-1ubuntu1) ... Unpacking tomcat10-admin (10.1.40-1ubuntu1.26.04.1) over (10.1.40-1ubuntu1) ... Setting up libtomcat10-java (10.1.40-1ubuntu1.26.04.1) ... Setting up tomcat10-common (10.1.40-1ubuntu1.26.04.1) ... Setting up tomcat10-admin (10.1.40-1ubuntu1.26.04.1) ... Setting up tomcat10 (10.1.40-1ubuntu1.26.04.1) ...
If APT asks about a locally modified file under /etc/tomcat10, compare the package maintainer version before replacing the local file. Replacing /etc/tomcat10/server.xml or /etc/tomcat10/tomcat-users.xml blindly can remove connectors, realms, Manager users, or deployment settings.
- Restart the Tomcat service.
$ sudo systemctl restart tomcat10
- Confirm the upgraded packages are installed.
$ dpkg-query -W tomcat10 tomcat10-common libtomcat10-java libtomcat10-java 10.1.40-1ubuntu1.26.04.1 tomcat10 10.1.40-1ubuntu1.26.04.1 tomcat10-common 10.1.40-1ubuntu1.26.04.1
- Check the Tomcat runtime version.
$ /usr/share/tomcat10/bin/version.sh Server version: Apache Tomcat/10.1.40 (Ubuntu) Server built: Jun 9 2026 12:08:21 UTC Server number: 10.1.40.0 OS Name: Linux OS Version: 6.12.76-linuxkit Architecture: aarch64 JVM Version: 25.0.3+9-2-26.04.2-Ubuntu JVM Vendor: Ubuntu
- Check that systemd sees the service as active.
$ sudo systemctl is-active tomcat10 active
Use How to check Tomcat service status on Linux when the service does not return active or exits immediately after the restart.
- Smoke-test the application through the local connector.
$ curl -I http://127.0.0.1:8080/ HTTP/1.1 200 Content-Type: text/html;charset=UTF-8 Date: Wed, 10 Jun 2026 20:31:47 GMT ##### snipped #####
Replace the root URL with the deployed application context, health endpoint, or login URL that proves the upgraded instance is serving the application normally.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.