一、删除php的相关包及配置
    sudo apt-get autoremove php7*
二、删除关联
    sudo find /etc -name "*php*" |xargs  rm -rf
三、清除dept列表
    sudo apt purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "`
//这行代码可有可无
sudo apt install software-properties-common
//电信网络有时连接不了,使用别的网络
sudo add-apt-repository ppa:ondrej/php
apt install php{新版}-fpm
php{新版}-mysql 
php{新版}-gd
php{新版}-json
php{新版}-shmop
php{新版}-sqlite3
php{新版}-mbstring
php{新版}-sockets
php{新版}-redis
php{新版}-intl
php{新版}-xml   
php{新版}-curl
php{新版}-swoole  