Debian stretch to buster update issues - PHP question - ok to keep old

was running on debian stretch for years; lost nextcloud support due to php 7.0 version.
currently my system is borked, trying to get myself back online;

my system still has php older versions still installed.
I used the apache2 commands ( a2dismod and a2enmod) to disable the old php version and enable php7.3.
The php 7.0 (and modules) remains installed on the server along with the php 7.3 (and modules)
Question : Should the old versions of PHP be uninstalled?

Thanks
qu1nn

still trying to resolve problems
/var/log/apache2/error.log has the following error:

[Tue Jun 09 22:01:07.825812 2020] [php7:error] [pid 1019] [client 192.168.1.7:47820] PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/nextcloud/lib/private/DB/Connection.php:64\nStack trace:\n#0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()\n#1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()\n#2 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()\n#3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()\n#4 /var/www/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)\n#5 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Obj in /var/www/nextcloud/lib/private/DB/Connection.php on line 64
[Tue Jun 09 22:01:07.826003 2020] [php7:error] [pid 1019] [client 192.168.1.7:47820] PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/nextcloud/lib/private/DB/Connection.php:64\nStack trace:\n#0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()\n#1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()\n#2 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()\n#3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()\n#4 /var/www/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)\n#5 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Obj in /var/www/nextcloud/lib/private/DB/Connection.php on line 64

from the following link ( below) they had a similar “uncaught doctrine”)

I did find the comparison in the /etc/php/7.0/cli/conf.d/ vs /etc/php/7.3/cli/conf.d/

there were some differences:

7.3 was missing the following ini files:
20-apcu_bc
20-enchangt.ini
20-mcrypt
20-pdo-dblib
20-pdo-sqlite
20-snmp
20-soap
20-sqlite3

the ones in bold were still not available (and not installed) as they are not available when searching for in the synaptic package manager.

Any suggestions would be greatly appreciated
qu1nn

Please install “apt-show-versions” and post list of packages not from buster

apt-show-versions | fgrep - v buster

Perhaps uninstall them.

devnull
I installed apt-show-versions (V0.22.11) and ran the command, the output is shown below:

root@linuxpd2:/# apt-show-versions | fgrep - v buster
grep: v: No such file or directory
grep: buster: No such file or directory
root@linuxpd2:/#

thanks for your time, its appreciated.
qu1nn

-v with no space.

help grep
linux basics

devnull:
thanks for the support.
answers my original post header question as the list that came up was mostly related to php7.0.

I did uninstall all that was on the list, I rebooted and unfortunately I still have the same Uncaught Doctrine\DBAL\DBALException: error.
My guess is that I am still missing a dependency.
I will go thru it yet again (must have done it like 5 times).

thanks for your time
qu1nn

Check for installed packages.