Home > Backend Development > PHP7 > How to completely delete PHP7.0 from Ubuntu

How to completely delete PHP7.0 from Ubuntu

藏色散人
Release: 2023-02-17 16:54:01
Original
4935 people have browsed it

Ubuntu彻底删除PHP的方法:首先通过命令“sudo apt-get autoremove php7*”删除php的相关包及配置;然后删除关联;接着清除dept列表;最后检查是否卸载干净即可。

How to completely delete PHP7.0 from Ubuntu

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

sudo apt-get autoremove php7*
Copy after login

二、删除关联

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

三、清除dept列表

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

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

 dpkg -l | grep php7.0
Copy after login

推荐:《PHP7

The above is the detailed content of How to completely delete PHP7.0 from Ubuntu. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template