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













27















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.










share|improve this question





























    27















    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.










    share|improve this question



























      27












      27








      27


      13






      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.










      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 21 '16 at 13:15







      Ramesh Chand

















      asked Jan 4 '16 at 8:37









      Ramesh ChandRamesh Chand

      3,54641930




      3,54641930






















          7 Answers
          7






          active

          oldest

          votes


















          8














          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





          share|improve this answer


























          • 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



















          70














          To remove php7.0 use



          sudo apt-get purge php7.0-common





          share|improve this answer





















          • 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



















          26














          This will remove all php7 version, be it php 7.0 or php 7.1 etc..



          sudo apt-get purge php7.*





          share|improve this answer





















          • 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





















          5














          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.*





          share|improve this answer































            3














            The way to remove PHP and dependencies is:



            apt-get autoremove php7.0





            share|improve this answer


























            • 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 to apt-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 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





















            3














            to remove php7.x simpely use



            sudo apt-get purge `dpkg -l | grep php7.2| awk '{print $2}' |tr "n" " "`





            share|improve this answer































              0














              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




              share








              New contributor




              Katie S is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.




















                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
                });


                }
                });














                draft saved

                draft discarded


















                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









                8














                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





                share|improve this answer


























                • 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
















                8














                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





                share|improve this answer


























                • 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














                8












                8








                8







                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





                share|improve this answer















                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






                share|improve this answer














                share|improve this answer



                share|improve this answer








                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



















                • 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













                70














                To remove php7.0 use



                sudo apt-get purge php7.0-common





                share|improve this answer





















                • 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
















                70














                To remove php7.0 use



                sudo apt-get purge php7.0-common





                share|improve this answer





















                • 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














                70












                70








                70







                To remove php7.0 use



                sudo apt-get purge php7.0-common





                share|improve this answer















                To remove php7.0 use



                sudo apt-get purge php7.0-common






                share|improve this answer














                share|improve this answer



                share|improve this answer








                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














                • 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











                26














                This will remove all php7 version, be it php 7.0 or php 7.1 etc..



                sudo apt-get purge php7.*





                share|improve this answer





















                • 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


















                26














                This will remove all php7 version, be it php 7.0 or php 7.1 etc..



                sudo apt-get purge php7.*





                share|improve this answer





















                • 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
















                26












                26








                26







                This will remove all php7 version, be it php 7.0 or php 7.1 etc..



                sudo apt-get purge php7.*





                share|improve this answer















                This will remove all php7 version, be it php 7.0 or php 7.1 etc..



                sudo apt-get purge php7.*






                share|improve this answer














                share|improve this answer



                share|improve this answer








                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
















                • 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













                5














                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.*





                share|improve this answer




























                  5














                  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.*





                  share|improve this answer


























                    5












                    5








                    5







                    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.*





                    share|improve this answer













                    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.*






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Feb 11 '17 at 12:15









                    MichaelMichael

                    18317




                    18317























                        3














                        The way to remove PHP and dependencies is:



                        apt-get autoremove php7.0





                        share|improve this answer


























                        • 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 to apt-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 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


















                        3














                        The way to remove PHP and dependencies is:



                        apt-get autoremove php7.0





                        share|improve this answer


























                        • 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 to apt-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 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
















                        3












                        3








                        3







                        The way to remove PHP and dependencies is:



                        apt-get autoremove php7.0





                        share|improve this answer















                        The way to remove PHP and dependencies is:



                        apt-get autoremove php7.0






                        share|improve this answer














                        share|improve this answer



                        share|improve this answer








                        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 to apt-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 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





















                        • 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 to apt-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 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



















                        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













                        3














                        to remove php7.x simpely use



                        sudo apt-get purge `dpkg -l | grep php7.2| awk '{print $2}' |tr "n" " "`





                        share|improve this answer




























                          3














                          to remove php7.x simpely use



                          sudo apt-get purge `dpkg -l | grep php7.2| awk '{print $2}' |tr "n" " "`





                          share|improve this answer


























                            3












                            3








                            3







                            to remove php7.x simpely use



                            sudo apt-get purge `dpkg -l | grep php7.2| awk '{print $2}' |tr "n" " "`





                            share|improve this answer













                            to remove php7.x simpely use



                            sudo apt-get purge `dpkg -l | grep php7.2| awk '{print $2}' |tr "n" " "`






                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Jul 12 '18 at 12:36









                            DOUICHI AbdesselamDOUICHI Abdesselam

                            311




                            311























                                0














                                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




                                share








                                New contributor




                                Katie S is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                Check out our Code of Conduct.

























                                  0














                                  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




                                  share








                                  New contributor




                                  Katie S is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                  Check out our Code of Conduct.























                                    0












                                    0








                                    0







                                    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




                                    share








                                    New contributor




                                    Katie S is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.










                                    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





                                    share








                                    New contributor




                                    Katie S is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.








                                    share


                                    share






                                    New contributor




                                    Katie S is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.









                                    answered 3 mins ago









                                    Katie SKatie S

                                    1012




                                    1012




                                    New contributor




                                    Katie S is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.





                                    New contributor





                                    Katie S is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.






                                    Katie S is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.






























                                        draft saved

                                        draft discarded




















































                                        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.




                                        draft saved


                                        draft discarded














                                        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





















































                                        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







                                        Popular posts from this blog

                                        Why do type traits not work with types in namespace scope?What are POD types in C++?Why can templates only be...

                                        Will tsunami waves travel forever if there was no land?Why do tsunami waves begin with the water flowing away...

                                        Should I use Docker or LXD?How to cache (more) data on SSD/RAM to avoid spin up?Unable to get Windows File...