how to uninstall a php version on ubuntu code example
Example 1: uninstall php ubuntu 18.04
$ sudo apt-get purge php7.*
$ sudo apt-get autoclean
$ sudo apt-get autoremove
Example 2: uninstall php 8.0 ubuntu
$ sudo apt-get purge php7.*
$ sudo apt-get purge php7.*
$ sudo apt-get autoclean
$ sudo apt-get autoremove
$ sudo apt-get purge php7.*