Home  >  Article  >  Backend Development  >  How to delete php in debian

How to delete php in debian

青灯夜游
青灯夜游Original
2021-03-29 10:15:462492browse

方法:首先使用“sudo apt-get autoremove php7*”命令删除php的相关包及配置;然后用“sudo find /etc -name "*php*" |xargs rm -rf”命令删除关联文件;最后清除dept列表。

How to delete php in debian

本教程操作环境:windows7系统、PHP7.0版,DELL G3电脑

debian/Ubuntu彻底删除PHP7.0

1、删除php的相关包及配置

sudo apt-get autoremove php7*

2、删除关联

sudo find /etc -name "*php*" |xargs  rm -rf

3、清除dept列表

sudo apt purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "`

四、检查是否卸载干净(无返回就是卸载完成)

dpkg -l | grep php7.0

再次使用    这个命令安装php

root@greatwall-DF720:/# sudo apt-get install php7.0

推荐学习:《PHP视频教程

The above is the detailed content of How to delete php in debian. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn