删除ubuntu自带的php的方法:1、通过“sudo apt-get autoremove php7.0”命令;2、通过“sudo aptitude purge `dpkg -l | grep php| awk '{...}”方法。
本文操作环境:ubuntu 16.04系统、PHP7.0版,DELL G3电脑
怎么删除ubuntu自带的php?
卸载(第一种)
sudo apt-get - -purge remove libapache2-mod-php7.0 php7.0 php7.0-gd php7.0-mysql (安装了哪些组件就跟上名字,我这里只安装了这4个)
sudo apt-get autoremove php7.0
卸载(第二种)
sudo aptitude purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "`
查询,卸载已安装php,就卸载完了。
(如果aptitude命令报错就安装aptiude:apt-get install aptitude)
如果想要安装其他php版本:
添加支持源
add-apt-repository ppa:ondrej/php
接下来就apt-get安装就好了。
推荐学习:《PHP视频教程》
The above is the detailed content of How to delete php that comes with ubuntu. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment
