php" |xargs rm -rf3 , clear the dept listsudo 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.0Then install the php7.0 version, because php7.0 has been moved from the package management in ubuntu Except, so we need to re-add authorizationadd-apt-repository ppa:ondrej/phpapt-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 commandapt-get install software-properties-commonAfter 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