Migrated NC 15 to NC 25.0.1

Upgraded the server from Ubuntu 18.04 to Ubuntu 20.04 which automatically upgraded php 7.2 to 8.1 and broke the NC 15 upgrade path.

Lesson learned:
1st do not upgrade Ubuntu 20.04 which default installs php 7.4 and prevents NC 15 to 16 upgrades because prefers php 7.2 and not 7.4
Error:Thiis version of Nextcloud is not compatible with > PHP 7.3

Had to do comment out code in so I can upgrade:
sudo /var/www/nextcloud/lib/versioncheck.php

Once I got to NC 25.0.1, I made sure the php8.1 modules installed matched php 7.4

Since you are on 25.0.1 you can switch back to php 8.1 assuming you are on 64bit architecture.

To switch back and forth between php 7.4 and 8.1, I modify the following:

nano /etc/nginx/sites-available/your.conf
fastcgi_pass unix:/run/php/php(7.4|8.1)-fpm.sock;

Manually select the php version to use
sudo update-alternatives --config php

I am prepared for the end of Nov 2022 when php7.4 is no longer supported.
Planning to switch to Ubuntu 22.04 when NC 25.0.1 can reliably support php8.1

Any idea when that future date becomes realized?