How to completely remove a package in Ubuntu (like it never existed)How do I cleanly remove apache2 server on...

Potential client has a problematic employee I can't work with

What is the industry term for house wiring diagrams?

Lightning Data Table inline edit

Prevent Nautilus / Nemo from creating .Trash-1000 folder in mounted devices

What kind of places would goblins live in a fantasy setting with strong states?

Crack the bank account's password!

Writing dialogues for characters whose first language is not English

What can I do to encourage my players to use their consumables?

How can I prevent an oracle who can see into the past from knowing everything that has happened?

Is `Object` a function in javascript?

Where does documentation like business and software requirement spec docs fit in an agile project?

Equivalent of "illegal" for violating civil law

How to create a label containing values from different layers in QGIS

Boss asked me to sign a resignation paper without a date on it along with my new contract

How to politely refuse in-office gym instructor for steroids and protein

Single-row INSERT...SELECT much slower than separate SELECT

How to not let the Identify spell spoil everything?

Why is that max-Q doesn't occur in transonic regime

What are some ways of extending a description of a scenery?

Plausible reason for gold-digging ant

Why does 0.-5 evaluate to -5?

Can a player sacrifice a creature after declaring that creature as blocker while taking lethal damage?

Does the US government have any planning in place to ensure there's no shortages of food, fuel, steel and other commodities?

Is there a file that always exists and a 'normal' user can't lstat it?



How to completely remove a package in Ubuntu (like it never existed)


How do I cleanly remove apache2 server on ubuntu server and then reinstall?Remove apache from ubuntuWill apt-get remove mysql-server-5.1 delete /var/lib/mysql?Scripting installation of a virtual package provider on Debian/UbuntuHow can I exorcise a specific Ubuntu package that crashes on a postinstall script?Audit files on a Debian boxERROR Found no accessible config files for 'fail2ban' under /etc/fail2banHow to tell apt-get that a package is OK and does not need any more attentionapt-get remove package that didn't install properlyAttempting to purge mysql* with apt-get, unable to do so without interaction













4















When I remove a package in Ubuntu using apt-get remove package, it always seems to leave behind a lot of files... for example, log files in /var/log, config files in /etc, data in /var/lib, etc.



How do I COMPLETELY remove every trace of a package in Ubuntu, as if it never existed?










share|improve this question



























    4















    When I remove a package in Ubuntu using apt-get remove package, it always seems to leave behind a lot of files... for example, log files in /var/log, config files in /etc, data in /var/lib, etc.



    How do I COMPLETELY remove every trace of a package in Ubuntu, as if it never existed?










    share|improve this question

























      4












      4








      4








      When I remove a package in Ubuntu using apt-get remove package, it always seems to leave behind a lot of files... for example, log files in /var/log, config files in /etc, data in /var/lib, etc.



      How do I COMPLETELY remove every trace of a package in Ubuntu, as if it never existed?










      share|improve this question














      When I remove a package in Ubuntu using apt-get remove package, it always seems to leave behind a lot of files... for example, log files in /var/log, config files in /etc, data in /var/lib, etc.



      How do I COMPLETELY remove every trace of a package in Ubuntu, as if it never existed?







      linux ubuntu apt package-management packages






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 5 hours ago









      torjinxtorjinx

      1306




      1306






















          1 Answer
          1






          active

          oldest

          votes


















          8














          You should purge those packages.



          apt-get purge somepackage


          from man apt-get (APT-GET(8))



             purge
          purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).


          This is supposed to remove everything added by the package, such as config and data files. But I would assume it's possible that it generated something that is left behind anyway. dpkg doesn't track everything related to a package... and its cleanup scripts and such can be assumed to be imperfect and sometimes fail. Maybe it won't remove logs for example.






          share|improve this answer



















          • 1





            It should be noted that even purge does not remove e.g. config files in ~/.local, see this answer over on askubuntu for a deeper dive.

            – Jared Smith
            2 hours ago











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "2"
          };
          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%2fserverfault.com%2fquestions%2f955616%2fhow-to-completely-remove-a-package-in-ubuntu-like-it-never-existed%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          8














          You should purge those packages.



          apt-get purge somepackage


          from man apt-get (APT-GET(8))



             purge
          purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).


          This is supposed to remove everything added by the package, such as config and data files. But I would assume it's possible that it generated something that is left behind anyway. dpkg doesn't track everything related to a package... and its cleanup scripts and such can be assumed to be imperfect and sometimes fail. Maybe it won't remove logs for example.






          share|improve this answer



















          • 1





            It should be noted that even purge does not remove e.g. config files in ~/.local, see this answer over on askubuntu for a deeper dive.

            – Jared Smith
            2 hours ago
















          8














          You should purge those packages.



          apt-get purge somepackage


          from man apt-get (APT-GET(8))



             purge
          purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).


          This is supposed to remove everything added by the package, such as config and data files. But I would assume it's possible that it generated something that is left behind anyway. dpkg doesn't track everything related to a package... and its cleanup scripts and such can be assumed to be imperfect and sometimes fail. Maybe it won't remove logs for example.






          share|improve this answer



















          • 1





            It should be noted that even purge does not remove e.g. config files in ~/.local, see this answer over on askubuntu for a deeper dive.

            – Jared Smith
            2 hours ago














          8












          8








          8







          You should purge those packages.



          apt-get purge somepackage


          from man apt-get (APT-GET(8))



             purge
          purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).


          This is supposed to remove everything added by the package, such as config and data files. But I would assume it's possible that it generated something that is left behind anyway. dpkg doesn't track everything related to a package... and its cleanup scripts and such can be assumed to be imperfect and sometimes fail. Maybe it won't remove logs for example.






          share|improve this answer













          You should purge those packages.



          apt-get purge somepackage


          from man apt-get (APT-GET(8))



             purge
          purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).


          This is supposed to remove everything added by the package, such as config and data files. But I would assume it's possible that it generated something that is left behind anyway. dpkg doesn't track everything related to a package... and its cleanup scripts and such can be assumed to be imperfect and sometimes fail. Maybe it won't remove logs for example.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 5 hours ago









          PeterPeter

          1,85611020




          1,85611020








          • 1





            It should be noted that even purge does not remove e.g. config files in ~/.local, see this answer over on askubuntu for a deeper dive.

            – Jared Smith
            2 hours ago














          • 1





            It should be noted that even purge does not remove e.g. config files in ~/.local, see this answer over on askubuntu for a deeper dive.

            – Jared Smith
            2 hours ago








          1




          1





          It should be noted that even purge does not remove e.g. config files in ~/.local, see this answer over on askubuntu for a deeper dive.

          – Jared Smith
          2 hours ago





          It should be noted that even purge does not remove e.g. config files in ~/.local, see this answer over on askubuntu for a deeper dive.

          – Jared Smith
          2 hours ago


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Server Fault!


          • 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%2fserverfault.com%2fquestions%2f955616%2fhow-to-completely-remove-a-package-in-ubuntu-like-it-never-existed%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

          Paper upload error, “Upload failed: The top margin is 0.715 in on page 3, which is below the required...

          Emraan Hashmi Filmografia | Linki zewnętrzne | Menu nawigacyjneGulshan GroverGulshan...

          How can I write this formula?newline and italics added with leqWhy does widehat behave differently if I...