Hello Guy How are you all? Hope You all are fine. Today in this tutorial we are going to learn about How To completely uninstall PHP 7.4 in ubuntu? In this tutorial, We will Discuss all possible methods to uninstall PHP from the ubuntu server. So Let’s start this article without wasting your time.
How To completely uninstall PHP 7.4 in ubuntu?
How To completely uninstall PHP in ubuntu?
To completely uninstall PHP in ubuntu Just Run purge, autoclean and autoremove command in your server, and this command will completely uninstall your PHP from your Ubuntu server. So follow all commands one by one. First Of all, You just need to run the purge command. Just run this command in your terminal: sudo apt-get purge php7.4 The above command will Uninstall Any of the PHP 7.4 versions of PHP installed on your Server. Now we need to cleans obsolete deb-packages to do so we need to run autoclean command: sudo apt-get autoclean After that, we need to remove orphaned packages that are no longer needed from the system so run autoremove command just like this: sudo apt-get autoremove And Now, You have Successfully Uninstalled PHP from your system. Thank You.
completely uninstall PHP in ubuntu
To completely uninstall PHP in ubuntu Just Run purge, autoclean and autoremove command in your server, and this command will completely uninstall your PHP from your Ubuntu server. So follow all commands one by one. First Of all, You just need to run the purge command. Just run this command in your terminal: sudo apt-get purge php7.4 The above command will Uninstall Any of the PHP 7.4 versions of PHP installed on your Server. Now we need to cleans obsolete deb-packages to do so we need to run autoclean command: sudo apt-get autoclean After that, we need to remove orphaned packages that are no longer needed from the system so run autoremove command just like this: sudo apt-get autoremove And Now, You have Successfully Uninstalled PHP from your system. Thank You.
Solution 1: Run this command
To completely uninstall PHP in ubuntu Just Run purge, autoclean and autoremove command in your server, and this command will completely uninstall your PHP from your Ubuntu server. So follow all commands one by one.
First Of all, You just need to run the purge command. Just run this command in your terminal.
sudo apt-get purge php7.4
The above command will Uninstall Any of the PHP 7.4 versions of PHP installed on your Server. Now we need to cleans obsolete deb-packages to do so we need to run autoclean command.
sudo apt-get autoclean
After that, we need to remove orphaned packages that are no longer needed from the system so run autoremove command just like this.
sudo apt-get autoremove
You can run this all command together
sudo apt-get purge php7.4
sudo apt-get autoclean
sudo apt-get autoremove
And Now, You have Successfully Uninstalled PHP from your system. Thank You.
Solution 2: Follow this command
You Can use this all command to remove PHP from your system.
sudo apt-get purge `dpkg -l | grep php7.4| awk '{print $2}' |tr "\n" " "`
sudo apt-get purge php7.4
sudo apt-get autoremove --purge
whereis php
sudo rm -rf /etc/php
Above all Command will completely remove PHP from your system. Thanks.
Conclusion
It’s all About this error. I hope We Have solved Your error. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also, Read
- Warning: “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”
- Undefined symbol ‘Route’. Intelephense
- The POST method is not supported for this route. Supported methods: GET, HEAD
- Array and string offset access syntax with curly braces is deprecated
- PHP Warning: PHP Startup: Unable to load dynamic library ‘pdo_mysql.so’