How to delete php that comes with ubuntu
删除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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian

Android TV Box gets unofficial Ubuntu 24.04 upgrade

How To Set Up Visual Studio Code (VS Code) for PHP Development
