Facing issue while installing php7.3 on Ubuntu 18.04 “Not replacing deleted config file /etc/php/7.3/apache2/php.ini,”
Ubuntu 18.04 comes with PHP 7.2, so your version 7.3 comes from an additional PPA, in your log it states you are using the sury.org version.
libapache2-mod-php7.3 is the package that links PHP and Apache, if both are installed you get it automatically. But you can uninstall and purge it independently from ubuntu, so it forgets the state in which it was installed. The point is that APT tries to not mess with what a user does, which is sometime great and sometimes annoying
apt remove libapache2-mod-php7.3
apt purge libapache2-mod-php7.3
apt install libapache2-mod-php7.3
You can probably combine these steps into a single command, but I prefer atomic operations so I can understand each state. You should now see a line stating
Creating config file /etc/php/7.3/apache2/php.ini with new version
Ubuntu 20.04 is a newer LTS version, that comes by default with PHP 7.4. The dist-upgrade command used to upgrade versions, but I don't think that is true anymore. And apt-get has been replaced by just apt