php " |xargs rm -rf3 , clear the dept list sudo apt purge
dpkg -l | grep php| awk '{print $2}' |tr "\n" " "
4. Check Is the uninstallation clean (no return means the uninstallation is complete)
dpkg -l | grep php7.0
Then install the php7.0 version, because php7.0 has been moved from the package management in ubuntu Except, so we need to re-add authorization
add-apt-repository ppa:ondrej/php
apt-get updatethrough the above The command can install the php7.0 version. If it prompts that add-apt-repository does not exist, you can execute the following command apt-get install software-properties-common After the above operations, we Just downgraded the php version from php7.2 to php7.0
apt-get install php7.0
Personal test and it works