How do i uninstall php 7.3 on centos 7?

First remove everything regarding old php version (will take some time...)

    sudo yum remove --setopt=clean_requirements_on_remove=1 php php-pear php-mysql php-cli php-common mod-php

then, install newer version (will take even more time)

    sudo yum install mod_php70u php70u-cli php70u-mysqlnd

dont forget to do restart and check sudo apachectl restart systemctl status httpd

If you're running fpm with NGinX then use following uninstall (this will keep the config's just o remove packages / dependencies)

    sudo yum remove --setopt=clean_requirements_on_remove=1 php-fpm php-cli php-common php7-fpm php7-cli php7-common

and install

    sudo yum install php7-fpm-nginx php7-cli php7-mysqlnd

(use [72] instead of [7] if you need to)

save, exit and restart

    sudo systemctl restart php-fpm
    sudo systemctl restart nginx #(or whatever you use)

please consider stepping down to version 7.1, as that might be a little less pain connecting modules than latest version, especially on always problematic centOS

(thanks @fyrye for options on remove)

  • Introduction
  • Prerequisites
  • Step 1 – Get List of all PHP modules installed
  • Step 2 – Uninstall the undesired PHP modules installed
  • Step 3 – Verifying if PHP is uninstalled
  • Conclusion
    • How to Install and SetUp Apache Web Server on CentOS 7
    • How to Uninstall PHP 7.4 on Ubuntu 20.04
    • How to Install PHP 7.4 on Ubuntu 20.04
    • How to Upgrade MariaDB 5.5 to 10.4 on CentOS 7

Introduction

PHP is a server-side scripting language used for web development. PHP is a really powerful tool for developing backend web applications.

Đang xem: How to uninstall php 7

In this tutorial we will learn how to uninstall PHP 7.3 on CentOS 7.

Prerequisites

An up-to-date CentOS 7 server instanceA sudo userPHP 7.3 already installed on the server.

Xem thêm: Ung Thư Đại Tràng Polyp Đại Trực Tràng Có Thể Tiến Triển Thành Ung Thư ​

Step 1 – Get List of all PHP modules installed

First lets run this command to get the list of all PHP related modules installed on the system:

yum list installed | grep phpExpected Output:

php.x86_64 7.3.4-1.el7.remi
remi-php73php-bcmath.x86_64 7.3.4-1.el7.remi
remi-php73php-cli.x86_64 7.3.4-1.el7.remi
remi-php73php-common.x86_64 7.3.4-1.el7.remi
remi-php73php-devel.x86_64 7.3.4-1.el7.remi
remi-php73php-fedora-autoloader.noarch 1.0.0-1.el7
epel php-fpm.x86_64 7.3.4-1.el7.remi
remi-php73php-gd.x86_64 7.3.4-1.el7.remi
remi-php73php-json.x86_64 7.3.4-1.el7.remi
remi-php73php-mbstring.x86_64 7.3.4-1.el7.remi
remi-php73php-mysqlnd.x86_64 7.3.4-1.el7.remi
remi-php73php-pdo.x86_64 7.3.4-1.el7.remi
remi-php73php-pear.noarch 1:1.10.9-2.el7.remi
remi-php73php-pecl-mcrypt.x86_64 1.0.2-2.el7.remi.7.3
remi-php73php-pecl-zip.x86_64 1.15.4-1.el7.remi.7.3
remi-php73php-process.x86_64 7.3.4-1.el7.remi
remi-php73php-xml.x86_64 7.3.4-1.el7.remi
remi-php73

Step 2 – Uninstall the undesired PHP modules installed

Once the packages are listed, you can uninstall the unrequired package using the following command:

yum -y remove For example, to remove the PHP cli package run the following command:

yum -y remove php-cli.x86_64This will uninstall the PHP-cli package from your CentOS 7 system.

If you want to remove PHP and all its related modules, you can run the following command:

yum -y remove php*This will remove PHP and all its related modules from your system

Step 3 – Verifying if PHP is uninstalled

You can also verify if PHP is successfully uninstalled by running the following command:

yum list installed | grep phpYou are expected to see no packages listed.

Xem thêm: Phân Biệt ” Phần Mềm J&Amp;T, Phân Biệt Phần Mềm Và Ứng Dụng

Conclusion

Congrats on uninstalling PHP 7.3 from your CentOS 7 server.

For more information visit:

PHP information

Tags
Facebook
Twitter
Pinterest
WhatsApp
Previous articleHow to Change Hostname CentOS 8
Next articleHow to Install MariaDB on CentOS 7

How do i uninstall php 7.3 on centos 7?

How to Install and SetUp Apache Web Server on CentOS 7

August 3, 2020
POPULAR POSTS

How do i uninstall php 7.3 on centos 7?

How to Uninstall PHP 7.4 on Ubuntu 20.04

August 10, 2020

How do i uninstall php 7.3 on centos 7?

How to Install PHP 7.4 on Ubuntu 20.04

August 10, 2020

How do i uninstall php 7.3 on centos 7?

How to Upgrade MariaDB 5.5 to 10.4 on CentOS 7

August 9, 2020
POPULAR CATEGORY
ABOUT US
Linux Tutorials, How-Tos, Guides and Resouces!
FOLLOW US
© in4tintuc.com © 2021 All Rights Reserved. This site uses cookies. By using this website you agree with our terms and services.

How do I remove a specific version of PHP?

Select Updates. Select Add/ Remove Components. Select Web Hosting >> PHP interpreter versions. Select the outdated version of PHP, and then select Remove.

How do I uninstall PHP?

To uninstall the PHP agent from your system:.
Remove the agent files from your system: RedHat or CentOS. ... .
Remove any remaining New Relic configuration files. ... .
If you use a package manager, remove files specific to the manager: ... .
Restart your web servers (Apache, Nginx, PHP-FPM, etc.)..

How do I uninstall PHP extensions?

Remove the Extension's Configuration File To remove a PHP extension, SSH into your server as root and run the following command. Replace EXTENSION with the name of the extension to remove. If the extension was installed on multiple PHP versions, repeat the above steps for each PHP version.