The cleanest upgrade path I could devise with my blunt force devops style after a few failed attempts, was just to full on remove PHP 8.0 and then install 8.1 afterwards. In this case 8.0 was installed via the ppa:ondrej/php prior and there is no good way to do a straight normal upgrade as these PHP packages are annoyingly to me, built to be installed side-by-side.
If you have never installed PHP via ppa:ondrej/php these instructions may still help you clean out the system packages but you'll still need to add the repo to get 8.1 installed.
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update

Before You Commit

Know: If your app is just a small single server deal, you are going to have a few minutes downtime.
Know: You are going to want to somewhat audit your app to make sure it's actually going to be OK. Eight Oh to Eight One isn't a big jump, most things that are solid on 8 should be fine already.

Do It

First we're taking the web server down, in this instance Apache.
sudo apachectl stop
Then because if you aren't stirring all the shit at once can you even call yourself a devops? Did a full system upgrade. It is likely you can skip the upgrade but you'll still need to do the update to get apt to fetch the latest package index.
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get update
Then we need to see a list of all the PHP packages installed. The goal is to replace them all with 8.1 versions.
$ apt list --installed | grep php | cut -d "/" -f 1
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

But screw trying to remember that so lets write a text file to disk with the 8.0 turned into 8.1. That warning above is in STDERR so we can ignore like I have been the past 15 years.
apt list --installed | grep php | cut -d "/" -f 1 | sed s/8.0/8.1/ > php.txt
Now that we've saved a text file listing what we need, get rid of the 8.0 packages. If you're chicken, check that php.txt file first to make sure you didn't mess it up.
apt list --installed | grep php | cut -d "/" -f 1 | xargs sudo apt-get remove -y
Now that we have no PHP at all get 8.1 on there.
cat php.txt | sudo xargs apt-get install -y
It should be good to go. Bring services back up and pretend nothing happened.
sudo apachectl start