How do I remove PHP 7 Completely?Unable to locate package php7.0How to completely remove PHP?How to...
Is there a lava-breathing lizard creature (that could be worshipped by a cult) in 5e?
Early credit roll before the end of the film
Strange "DuckDuckGo dork" takes me to random website
Has any human ever had the choice to leave Earth permanently?
Why didn't Tom Riddle take the presence of Fawkes and the Sorting Hat as more of a threat?
Airplane generations - how does it work?
How to access internet and run apt-get through a middle server?
Do authors have to be politically correct in article-writing?
Treasure Hunt Riddle
How to not let the Identify spell spoil everything?
Why did Luke use his left hand to shoot?
How does Leonard in "Memento" remember reading and writing?
False written accusations not made public - is there law to cover this?
Count repetitions of an array
How would you say "I like to go bowling" and other suru verbs?
Plausible reason for gold-digging ant
Can you tell from a blurry photo if focus was too close or too far?
Is there a verb that means to inject with poison?
How can I play a serial killer in a party of good PCs?
Why does magnet wire need to be insulated?
Why does PHOTOREC keep finding files?
Has Britain negotiated with any other countries outside the EU in preparation for the exit?
What will happen if I transfer large sums of money into my bank account from a pre-paid debit card or gift card?
Does diversity provide anything that meritocracy does not?
How do I remove PHP 7 Completely?
Unable to locate package php7.0How to completely remove PHP?How to completely remove php libraries?Apache won't start - PHP issues?MySQL not working after upgrade from 14.04 to 16.04Ubuntu 16.04 install ElasticSearch 5.x, failed to startApache PHP7 Mysql5 on Ubuntu 16.04.1Failed to load apache server?What's wrong with my Mythtv installJob for apache2.service failed because the control process exited with error code.PHP in LAMP first display in plain text, now it can't find file, nothing helps
I have upgraded PHP old version to latest php7 but unable to start its services.
systemctl restart apache2.service
Job for apache2.service failed. See "systemctl status apache2.service" and "journalctl -xe" for details.
Status Detail:
systemctl status apache2.service
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Active: failed (Result: exit-code) since Mon 2016-01-04 13:58:17 IST; 5s ago
Docs: man:systemd-sysv-generator(8)
Process: 16666 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Jan 04 13:58:17 GCT022 apache2[16666]: *
Jan 04 13:58:17 GCT022 apache2[16666]: * The apache2 configtest failed.
Jan 04 13:58:17 GCT022 apache2[16666]: Output of config test was:
Jan 04 13:58:17 GCT022 apache2[16666]: apache2: Syntax error on line 140 of /etc/apache2...
Jan 04 13:58:17 GCT022 apache2[16666]: Action 'configtest' failed.
Jan 04 13:58:17 GCT022 apache2[16666]: The Apache error log may have more information.
Jan 04 13:58:17 GCT022 systemd[1]: apache2.service: control process exited, code=exit...s=1
Jan 04 13:58:17 GCT022 systemd[1]: Failed to start LSB: Apache2 web server.
Jan 04 13:58:17 GCT022 systemd[1]: Unit apache2.service entered failed state.
Jan 04 13:58:17 GCT022 systemd[1]: apache2.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
root@client022:/home/user22$ ^C
Now I want to revert back or remove php7 that i can do the user machine active with the old version.
14.04 php
add a comment |
I have upgraded PHP old version to latest php7 but unable to start its services.
systemctl restart apache2.service
Job for apache2.service failed. See "systemctl status apache2.service" and "journalctl -xe" for details.
Status Detail:
systemctl status apache2.service
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Active: failed (Result: exit-code) since Mon 2016-01-04 13:58:17 IST; 5s ago
Docs: man:systemd-sysv-generator(8)
Process: 16666 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Jan 04 13:58:17 GCT022 apache2[16666]: *
Jan 04 13:58:17 GCT022 apache2[16666]: * The apache2 configtest failed.
Jan 04 13:58:17 GCT022 apache2[16666]: Output of config test was:
Jan 04 13:58:17 GCT022 apache2[16666]: apache2: Syntax error on line 140 of /etc/apache2...
Jan 04 13:58:17 GCT022 apache2[16666]: Action 'configtest' failed.
Jan 04 13:58:17 GCT022 apache2[16666]: The Apache error log may have more information.
Jan 04 13:58:17 GCT022 systemd[1]: apache2.service: control process exited, code=exit...s=1
Jan 04 13:58:17 GCT022 systemd[1]: Failed to start LSB: Apache2 web server.
Jan 04 13:58:17 GCT022 systemd[1]: Unit apache2.service entered failed state.
Jan 04 13:58:17 GCT022 systemd[1]: apache2.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
root@client022:/home/user22$ ^C
Now I want to revert back or remove php7 that i can do the user machine active with the old version.
14.04 php
add a comment |
I have upgraded PHP old version to latest php7 but unable to start its services.
systemctl restart apache2.service
Job for apache2.service failed. See "systemctl status apache2.service" and "journalctl -xe" for details.
Status Detail:
systemctl status apache2.service
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Active: failed (Result: exit-code) since Mon 2016-01-04 13:58:17 IST; 5s ago
Docs: man:systemd-sysv-generator(8)
Process: 16666 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Jan 04 13:58:17 GCT022 apache2[16666]: *
Jan 04 13:58:17 GCT022 apache2[16666]: * The apache2 configtest failed.
Jan 04 13:58:17 GCT022 apache2[16666]: Output of config test was:
Jan 04 13:58:17 GCT022 apache2[16666]: apache2: Syntax error on line 140 of /etc/apache2...
Jan 04 13:58:17 GCT022 apache2[16666]: Action 'configtest' failed.
Jan 04 13:58:17 GCT022 apache2[16666]: The Apache error log may have more information.
Jan 04 13:58:17 GCT022 systemd[1]: apache2.service: control process exited, code=exit...s=1
Jan 04 13:58:17 GCT022 systemd[1]: Failed to start LSB: Apache2 web server.
Jan 04 13:58:17 GCT022 systemd[1]: Unit apache2.service entered failed state.
Jan 04 13:58:17 GCT022 systemd[1]: apache2.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
root@client022:/home/user22$ ^C
Now I want to revert back or remove php7 that i can do the user machine active with the old version.
14.04 php
I have upgraded PHP old version to latest php7 but unable to start its services.
systemctl restart apache2.service
Job for apache2.service failed. See "systemctl status apache2.service" and "journalctl -xe" for details.
Status Detail:
systemctl status apache2.service
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Active: failed (Result: exit-code) since Mon 2016-01-04 13:58:17 IST; 5s ago
Docs: man:systemd-sysv-generator(8)
Process: 16666 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Jan 04 13:58:17 GCT022 apache2[16666]: *
Jan 04 13:58:17 GCT022 apache2[16666]: * The apache2 configtest failed.
Jan 04 13:58:17 GCT022 apache2[16666]: Output of config test was:
Jan 04 13:58:17 GCT022 apache2[16666]: apache2: Syntax error on line 140 of /etc/apache2...
Jan 04 13:58:17 GCT022 apache2[16666]: Action 'configtest' failed.
Jan 04 13:58:17 GCT022 apache2[16666]: The Apache error log may have more information.
Jan 04 13:58:17 GCT022 systemd[1]: apache2.service: control process exited, code=exit...s=1
Jan 04 13:58:17 GCT022 systemd[1]: Failed to start LSB: Apache2 web server.
Jan 04 13:58:17 GCT022 systemd[1]: Unit apache2.service entered failed state.
Jan 04 13:58:17 GCT022 systemd[1]: apache2.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
root@client022:/home/user22$ ^C
Now I want to revert back or remove php7 that i can do the user machine active with the old version.
14.04 php
14.04 php
edited May 21 '16 at 13:15
Ramesh Chand
asked Jan 4 '16 at 8:37
Ramesh ChandRamesh Chand
3,54641930
3,54641930
add a comment |
add a comment |
7 Answers
7
active
oldest
votes
As I have answered your question Unable to locate package php7.0 and you have accepted my answer and because you explicitly ask for a removal of the package:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:ondrej/php-7.0
It was installed all the packages and I have checked day its PHP-v it was Ok Shutdown the System today, just checked that php7 unable start services so maybe it is the different issue.
– Ramesh Chand
Jan 4 '16 at 8:54
$ sudo ppa-purge ppa:ondrej/php-7.0 sudo: ppa-purge: command not found
– Ramesh Chand
Jan 4 '16 at 8:57
Answer updated.
– A.B.
Jan 4 '16 at 8:58
add a comment |
To remove php7.0 use
sudo apt-get purge php7.0-common
6
"This should be the accepted answer"
– Nino Škopac
Dec 16 '16 at 17:31
Yeah, this must be the accepted one.
– Nam G VU
Feb 4 '18 at 4:40
add a comment |
This will remove all php7 version, be it php 7.0 or php 7.1 etc..
sudo apt-get purge php7.*
4
Shouldn't that be sudo apt-get purge php7.* ?
– kurdtpage
Jan 19 '17 at 20:45
This also purged my php5.
– pbond
Mar 3 '17 at 15:01
@kurdtpage +1 I tried it again and yes it did purged php5. also, don't know why though that was not the case earlier .
– Abhishek Pareek
Mar 14 '17 at 7:04
@AbhishekPareek the*
is a regex star, not a glob star.
– Chai T. Rex
Apr 17 '18 at 22:48
add a comment |
If you run Abhishek's it will remove other packages. On mine it was going to remove these too
The following packages will be REMOVED
libapache2-mod-php5.5*
libapache2-mod-php5.6* php-common* php-gettext* php-igbinary*
php-memcached* php-msgpack* php-pear* php-xdebug* php5-cli*
php5-common* php5-dev* php5-json* php5-memcache* php5-memcached*
php5-readline* php5-redis* php5-xdebug* php5.5-cli* php5.5-common*
php5.5-curl* php5.5-json* php5.5-mysql* php5.5-opcache*
php5.5-readline* php5.5-xml* php5.6* php5.6-cli* php5.6-common*
php5.6-curl* php5.6-fpm* php5.6-json* php5.6-mbstring* php5.6-mysql*
php5.6-opcache* php5.6-readline* php5.6-xml* pkg-php-tools*
So you're better off with
sudo apt-get purge php7.*
add a comment |
The way to remove PHP and dependencies is:
apt-get autoremove php7.0
This is the same as most of the other answers.
– ubashu
Apr 17 '18 at 4:26
1
I don't think any of the other answers suggest precisely this...
– Zanna
Apr 17 '18 at 6:14
1
@Zanna You are right. Moreover, this seems to work on my Ubuntu 16.04 but giving a package name toapt-get autoremove
is not documented in the man page.
– Melebius
Apr 18 '18 at 7:29
1
@Melebius yes it works for me on 17.10 too -autoremove
in place ofremove
causes the orphaned dependencies to be removed at the same time, which saves running an additional command. I don't know why it is not documented as it's very useful!
– Zanna
Apr 18 '18 at 7:38
add a comment |
to remove php7.x simpely use
sudo apt-get purge `dpkg -l | grep php7.2| awk '{print $2}' |tr "n" " "`
add a comment |
After purging, you still need to run some steps:
sudo apt-get purge php7.*
sudo apt-get autoremove --purge
whereis php
# Remove all dirs specified in last command:
sudo rm -rf /etc/php
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f716661%2fhow-do-i-remove-php-7-completely%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
7 Answers
7
active
oldest
votes
7 Answers
7
active
oldest
votes
active
oldest
votes
active
oldest
votes
As I have answered your question Unable to locate package php7.0 and you have accepted my answer and because you explicitly ask for a removal of the package:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:ondrej/php-7.0
It was installed all the packages and I have checked day its PHP-v it was Ok Shutdown the System today, just checked that php7 unable start services so maybe it is the different issue.
– Ramesh Chand
Jan 4 '16 at 8:54
$ sudo ppa-purge ppa:ondrej/php-7.0 sudo: ppa-purge: command not found
– Ramesh Chand
Jan 4 '16 at 8:57
Answer updated.
– A.B.
Jan 4 '16 at 8:58
add a comment |
As I have answered your question Unable to locate package php7.0 and you have accepted my answer and because you explicitly ask for a removal of the package:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:ondrej/php-7.0
It was installed all the packages and I have checked day its PHP-v it was Ok Shutdown the System today, just checked that php7 unable start services so maybe it is the different issue.
– Ramesh Chand
Jan 4 '16 at 8:54
$ sudo ppa-purge ppa:ondrej/php-7.0 sudo: ppa-purge: command not found
– Ramesh Chand
Jan 4 '16 at 8:57
Answer updated.
– A.B.
Jan 4 '16 at 8:58
add a comment |
As I have answered your question Unable to locate package php7.0 and you have accepted my answer and because you explicitly ask for a removal of the package:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:ondrej/php-7.0
As I have answered your question Unable to locate package php7.0 and you have accepted my answer and because you explicitly ask for a removal of the package:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:ondrej/php-7.0
edited Apr 13 '17 at 12:24
Community♦
1
1
answered Jan 4 '16 at 8:48
A.B.A.B.
69.1k12172265
69.1k12172265
It was installed all the packages and I have checked day its PHP-v it was Ok Shutdown the System today, just checked that php7 unable start services so maybe it is the different issue.
– Ramesh Chand
Jan 4 '16 at 8:54
$ sudo ppa-purge ppa:ondrej/php-7.0 sudo: ppa-purge: command not found
– Ramesh Chand
Jan 4 '16 at 8:57
Answer updated.
– A.B.
Jan 4 '16 at 8:58
add a comment |
It was installed all the packages and I have checked day its PHP-v it was Ok Shutdown the System today, just checked that php7 unable start services so maybe it is the different issue.
– Ramesh Chand
Jan 4 '16 at 8:54
$ sudo ppa-purge ppa:ondrej/php-7.0 sudo: ppa-purge: command not found
– Ramesh Chand
Jan 4 '16 at 8:57
Answer updated.
– A.B.
Jan 4 '16 at 8:58
It was installed all the packages and I have checked day its PHP-v it was Ok Shutdown the System today, just checked that php7 unable start services so maybe it is the different issue.
– Ramesh Chand
Jan 4 '16 at 8:54
It was installed all the packages and I have checked day its PHP-v it was Ok Shutdown the System today, just checked that php7 unable start services so maybe it is the different issue.
– Ramesh Chand
Jan 4 '16 at 8:54
$ sudo ppa-purge ppa:ondrej/php-7.0 sudo: ppa-purge: command not found
– Ramesh Chand
Jan 4 '16 at 8:57
$ sudo ppa-purge ppa:ondrej/php-7.0 sudo: ppa-purge: command not found
– Ramesh Chand
Jan 4 '16 at 8:57
Answer updated.
– A.B.
Jan 4 '16 at 8:58
Answer updated.
– A.B.
Jan 4 '16 at 8:58
add a comment |
To remove php7.0 use
sudo apt-get purge php7.0-common
6
"This should be the accepted answer"
– Nino Škopac
Dec 16 '16 at 17:31
Yeah, this must be the accepted one.
– Nam G VU
Feb 4 '18 at 4:40
add a comment |
To remove php7.0 use
sudo apt-get purge php7.0-common
6
"This should be the accepted answer"
– Nino Škopac
Dec 16 '16 at 17:31
Yeah, this must be the accepted one.
– Nam G VU
Feb 4 '18 at 4:40
add a comment |
To remove php7.0 use
sudo apt-get purge php7.0-common
To remove php7.0 use
sudo apt-get purge php7.0-common
edited Feb 25 '16 at 8:18
Byte Commander
65.1k27178300
65.1k27178300
answered Feb 25 '16 at 7:57
kbarhoumkbarhoum
70142
70142
6
"This should be the accepted answer"
– Nino Škopac
Dec 16 '16 at 17:31
Yeah, this must be the accepted one.
– Nam G VU
Feb 4 '18 at 4:40
add a comment |
6
"This should be the accepted answer"
– Nino Škopac
Dec 16 '16 at 17:31
Yeah, this must be the accepted one.
– Nam G VU
Feb 4 '18 at 4:40
6
6
"This should be the accepted answer"
– Nino Škopac
Dec 16 '16 at 17:31
"This should be the accepted answer"
– Nino Škopac
Dec 16 '16 at 17:31
Yeah, this must be the accepted one.
– Nam G VU
Feb 4 '18 at 4:40
Yeah, this must be the accepted one.
– Nam G VU
Feb 4 '18 at 4:40
add a comment |
This will remove all php7 version, be it php 7.0 or php 7.1 etc..
sudo apt-get purge php7.*
4
Shouldn't that be sudo apt-get purge php7.* ?
– kurdtpage
Jan 19 '17 at 20:45
This also purged my php5.
– pbond
Mar 3 '17 at 15:01
@kurdtpage +1 I tried it again and yes it did purged php5. also, don't know why though that was not the case earlier .
– Abhishek Pareek
Mar 14 '17 at 7:04
@AbhishekPareek the*
is a regex star, not a glob star.
– Chai T. Rex
Apr 17 '18 at 22:48
add a comment |
This will remove all php7 version, be it php 7.0 or php 7.1 etc..
sudo apt-get purge php7.*
4
Shouldn't that be sudo apt-get purge php7.* ?
– kurdtpage
Jan 19 '17 at 20:45
This also purged my php5.
– pbond
Mar 3 '17 at 15:01
@kurdtpage +1 I tried it again and yes it did purged php5. also, don't know why though that was not the case earlier .
– Abhishek Pareek
Mar 14 '17 at 7:04
@AbhishekPareek the*
is a regex star, not a glob star.
– Chai T. Rex
Apr 17 '18 at 22:48
add a comment |
This will remove all php7 version, be it php 7.0 or php 7.1 etc..
sudo apt-get purge php7.*
This will remove all php7 version, be it php 7.0 or php 7.1 etc..
sudo apt-get purge php7.*
edited Mar 14 '17 at 7:01
answered Jan 15 '17 at 23:04
Abhishek PareekAbhishek Pareek
36135
36135
4
Shouldn't that be sudo apt-get purge php7.* ?
– kurdtpage
Jan 19 '17 at 20:45
This also purged my php5.
– pbond
Mar 3 '17 at 15:01
@kurdtpage +1 I tried it again and yes it did purged php5. also, don't know why though that was not the case earlier .
– Abhishek Pareek
Mar 14 '17 at 7:04
@AbhishekPareek the*
is a regex star, not a glob star.
– Chai T. Rex
Apr 17 '18 at 22:48
add a comment |
4
Shouldn't that be sudo apt-get purge php7.* ?
– kurdtpage
Jan 19 '17 at 20:45
This also purged my php5.
– pbond
Mar 3 '17 at 15:01
@kurdtpage +1 I tried it again and yes it did purged php5. also, don't know why though that was not the case earlier .
– Abhishek Pareek
Mar 14 '17 at 7:04
@AbhishekPareek the*
is a regex star, not a glob star.
– Chai T. Rex
Apr 17 '18 at 22:48
4
4
Shouldn't that be sudo apt-get purge php7.* ?
– kurdtpage
Jan 19 '17 at 20:45
Shouldn't that be sudo apt-get purge php7.* ?
– kurdtpage
Jan 19 '17 at 20:45
This also purged my php5.
– pbond
Mar 3 '17 at 15:01
This also purged my php5.
– pbond
Mar 3 '17 at 15:01
@kurdtpage +1 I tried it again and yes it did purged php5. also, don't know why though that was not the case earlier .
– Abhishek Pareek
Mar 14 '17 at 7:04
@kurdtpage +1 I tried it again and yes it did purged php5. also, don't know why though that was not the case earlier .
– Abhishek Pareek
Mar 14 '17 at 7:04
@AbhishekPareek the
*
is a regex star, not a glob star.– Chai T. Rex
Apr 17 '18 at 22:48
@AbhishekPareek the
*
is a regex star, not a glob star.– Chai T. Rex
Apr 17 '18 at 22:48
add a comment |
If you run Abhishek's it will remove other packages. On mine it was going to remove these too
The following packages will be REMOVED
libapache2-mod-php5.5*
libapache2-mod-php5.6* php-common* php-gettext* php-igbinary*
php-memcached* php-msgpack* php-pear* php-xdebug* php5-cli*
php5-common* php5-dev* php5-json* php5-memcache* php5-memcached*
php5-readline* php5-redis* php5-xdebug* php5.5-cli* php5.5-common*
php5.5-curl* php5.5-json* php5.5-mysql* php5.5-opcache*
php5.5-readline* php5.5-xml* php5.6* php5.6-cli* php5.6-common*
php5.6-curl* php5.6-fpm* php5.6-json* php5.6-mbstring* php5.6-mysql*
php5.6-opcache* php5.6-readline* php5.6-xml* pkg-php-tools*
So you're better off with
sudo apt-get purge php7.*
add a comment |
If you run Abhishek's it will remove other packages. On mine it was going to remove these too
The following packages will be REMOVED
libapache2-mod-php5.5*
libapache2-mod-php5.6* php-common* php-gettext* php-igbinary*
php-memcached* php-msgpack* php-pear* php-xdebug* php5-cli*
php5-common* php5-dev* php5-json* php5-memcache* php5-memcached*
php5-readline* php5-redis* php5-xdebug* php5.5-cli* php5.5-common*
php5.5-curl* php5.5-json* php5.5-mysql* php5.5-opcache*
php5.5-readline* php5.5-xml* php5.6* php5.6-cli* php5.6-common*
php5.6-curl* php5.6-fpm* php5.6-json* php5.6-mbstring* php5.6-mysql*
php5.6-opcache* php5.6-readline* php5.6-xml* pkg-php-tools*
So you're better off with
sudo apt-get purge php7.*
add a comment |
If you run Abhishek's it will remove other packages. On mine it was going to remove these too
The following packages will be REMOVED
libapache2-mod-php5.5*
libapache2-mod-php5.6* php-common* php-gettext* php-igbinary*
php-memcached* php-msgpack* php-pear* php-xdebug* php5-cli*
php5-common* php5-dev* php5-json* php5-memcache* php5-memcached*
php5-readline* php5-redis* php5-xdebug* php5.5-cli* php5.5-common*
php5.5-curl* php5.5-json* php5.5-mysql* php5.5-opcache*
php5.5-readline* php5.5-xml* php5.6* php5.6-cli* php5.6-common*
php5.6-curl* php5.6-fpm* php5.6-json* php5.6-mbstring* php5.6-mysql*
php5.6-opcache* php5.6-readline* php5.6-xml* pkg-php-tools*
So you're better off with
sudo apt-get purge php7.*
If you run Abhishek's it will remove other packages. On mine it was going to remove these too
The following packages will be REMOVED
libapache2-mod-php5.5*
libapache2-mod-php5.6* php-common* php-gettext* php-igbinary*
php-memcached* php-msgpack* php-pear* php-xdebug* php5-cli*
php5-common* php5-dev* php5-json* php5-memcache* php5-memcached*
php5-readline* php5-redis* php5-xdebug* php5.5-cli* php5.5-common*
php5.5-curl* php5.5-json* php5.5-mysql* php5.5-opcache*
php5.5-readline* php5.5-xml* php5.6* php5.6-cli* php5.6-common*
php5.6-curl* php5.6-fpm* php5.6-json* php5.6-mbstring* php5.6-mysql*
php5.6-opcache* php5.6-readline* php5.6-xml* pkg-php-tools*
So you're better off with
sudo apt-get purge php7.*
answered Feb 11 '17 at 12:15
MichaelMichael
18317
18317
add a comment |
add a comment |
The way to remove PHP and dependencies is:
apt-get autoremove php7.0
This is the same as most of the other answers.
– ubashu
Apr 17 '18 at 4:26
1
I don't think any of the other answers suggest precisely this...
– Zanna
Apr 17 '18 at 6:14
1
@Zanna You are right. Moreover, this seems to work on my Ubuntu 16.04 but giving a package name toapt-get autoremove
is not documented in the man page.
– Melebius
Apr 18 '18 at 7:29
1
@Melebius yes it works for me on 17.10 too -autoremove
in place ofremove
causes the orphaned dependencies to be removed at the same time, which saves running an additional command. I don't know why it is not documented as it's very useful!
– Zanna
Apr 18 '18 at 7:38
add a comment |
The way to remove PHP and dependencies is:
apt-get autoremove php7.0
This is the same as most of the other answers.
– ubashu
Apr 17 '18 at 4:26
1
I don't think any of the other answers suggest precisely this...
– Zanna
Apr 17 '18 at 6:14
1
@Zanna You are right. Moreover, this seems to work on my Ubuntu 16.04 but giving a package name toapt-get autoremove
is not documented in the man page.
– Melebius
Apr 18 '18 at 7:29
1
@Melebius yes it works for me on 17.10 too -autoremove
in place ofremove
causes the orphaned dependencies to be removed at the same time, which saves running an additional command. I don't know why it is not documented as it's very useful!
– Zanna
Apr 18 '18 at 7:38
add a comment |
The way to remove PHP and dependencies is:
apt-get autoremove php7.0
The way to remove PHP and dependencies is:
apt-get autoremove php7.0
edited Apr 17 '18 at 6:14
Zanna
50.9k13136241
50.9k13136241
answered Apr 16 '18 at 22:48
ANLANL
311
311
This is the same as most of the other answers.
– ubashu
Apr 17 '18 at 4:26
1
I don't think any of the other answers suggest precisely this...
– Zanna
Apr 17 '18 at 6:14
1
@Zanna You are right. Moreover, this seems to work on my Ubuntu 16.04 but giving a package name toapt-get autoremove
is not documented in the man page.
– Melebius
Apr 18 '18 at 7:29
1
@Melebius yes it works for me on 17.10 too -autoremove
in place ofremove
causes the orphaned dependencies to be removed at the same time, which saves running an additional command. I don't know why it is not documented as it's very useful!
– Zanna
Apr 18 '18 at 7:38
add a comment |
This is the same as most of the other answers.
– ubashu
Apr 17 '18 at 4:26
1
I don't think any of the other answers suggest precisely this...
– Zanna
Apr 17 '18 at 6:14
1
@Zanna You are right. Moreover, this seems to work on my Ubuntu 16.04 but giving a package name toapt-get autoremove
is not documented in the man page.
– Melebius
Apr 18 '18 at 7:29
1
@Melebius yes it works for me on 17.10 too -autoremove
in place ofremove
causes the orphaned dependencies to be removed at the same time, which saves running an additional command. I don't know why it is not documented as it's very useful!
– Zanna
Apr 18 '18 at 7:38
This is the same as most of the other answers.
– ubashu
Apr 17 '18 at 4:26
This is the same as most of the other answers.
– ubashu
Apr 17 '18 at 4:26
1
1
I don't think any of the other answers suggest precisely this...
– Zanna
Apr 17 '18 at 6:14
I don't think any of the other answers suggest precisely this...
– Zanna
Apr 17 '18 at 6:14
1
1
@Zanna You are right. Moreover, this seems to work on my Ubuntu 16.04 but giving a package name to
apt-get autoremove
is not documented in the man page.– Melebius
Apr 18 '18 at 7:29
@Zanna You are right. Moreover, this seems to work on my Ubuntu 16.04 but giving a package name to
apt-get autoremove
is not documented in the man page.– Melebius
Apr 18 '18 at 7:29
1
1
@Melebius yes it works for me on 17.10 too -
autoremove
in place of remove
causes the orphaned dependencies to be removed at the same time, which saves running an additional command. I don't know why it is not documented as it's very useful!– Zanna
Apr 18 '18 at 7:38
@Melebius yes it works for me on 17.10 too -
autoremove
in place of remove
causes the orphaned dependencies to be removed at the same time, which saves running an additional command. I don't know why it is not documented as it's very useful!– Zanna
Apr 18 '18 at 7:38
add a comment |
to remove php7.x simpely use
sudo apt-get purge `dpkg -l | grep php7.2| awk '{print $2}' |tr "n" " "`
add a comment |
to remove php7.x simpely use
sudo apt-get purge `dpkg -l | grep php7.2| awk '{print $2}' |tr "n" " "`
add a comment |
to remove php7.x simpely use
sudo apt-get purge `dpkg -l | grep php7.2| awk '{print $2}' |tr "n" " "`
to remove php7.x simpely use
sudo apt-get purge `dpkg -l | grep php7.2| awk '{print $2}' |tr "n" " "`
answered Jul 12 '18 at 12:36
DOUICHI AbdesselamDOUICHI Abdesselam
311
311
add a comment |
add a comment |
After purging, you still need to run some steps:
sudo apt-get purge php7.*
sudo apt-get autoremove --purge
whereis php
# Remove all dirs specified in last command:
sudo rm -rf /etc/php
New contributor
add a comment |
After purging, you still need to run some steps:
sudo apt-get purge php7.*
sudo apt-get autoremove --purge
whereis php
# Remove all dirs specified in last command:
sudo rm -rf /etc/php
New contributor
add a comment |
After purging, you still need to run some steps:
sudo apt-get purge php7.*
sudo apt-get autoremove --purge
whereis php
# Remove all dirs specified in last command:
sudo rm -rf /etc/php
New contributor
After purging, you still need to run some steps:
sudo apt-get purge php7.*
sudo apt-get autoremove --purge
whereis php
# Remove all dirs specified in last command:
sudo rm -rf /etc/php
New contributor
New contributor
answered 3 mins ago
Katie SKatie S
1012
1012
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f716661%2fhow-do-i-remove-php-7-completely%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown