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

How much light is too much?

Caron Accent v{a} doesn't render without usepackage{xeCJK}

Co-worker sabotaging/undoing my work (software development)

Illustrator to chemdraw

How do dictionaries source attestation?

Is it possible to rotate the Isolines on a Surface Using `MeshFunction`?

Why did Ylvis use "go" instead of "say" in phrases like "Dog goes 'woof'"?

Remove isolated elements of a vector

How bad is a Computer Science course that doesn't teach Design Patterns?

Is it possible to detect 100% of SQLi with a simple regex?

What species should be used for storage of human minds?

Democratic Socialism vs Social Democracy

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

Is there any danger of my neighbor having my wife's signature?

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

Context html export bibliography

What is the draw frequency for 3 consecutive games (same players; amateur level)?

Count repetitions of an array

How to fly a direct entry holding pattern when approaching from an awkward angle?

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

If angels and devils are the same species, why would their mortal offspring appear physically different?

The No-Straight Maze

Critique vs nitpicking

RS485 using USART or UART port on STM32



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













1















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



























    1















    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

























      1












      1








      1








      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 1 hour ago









      torjinxtorjinx

      1156




      1156






















          1 Answer
          1






          active

          oldest

          votes


















          3














          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
























          • Hey that works great, thanks!

            – torjinx
            30 mins 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









          3














          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
























          • Hey that works great, thanks!

            – torjinx
            30 mins ago
















          3














          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
























          • Hey that works great, thanks!

            – torjinx
            30 mins ago














          3












          3








          3







          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 48 mins ago









          PeterPeter

          1,80411020




          1,80411020













          • Hey that works great, thanks!

            – torjinx
            30 mins ago



















          • Hey that works great, thanks!

            – torjinx
            30 mins ago

















          Hey that works great, thanks!

          – torjinx
          30 mins ago





          Hey that works great, thanks!

          – torjinx
          30 mins 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

          Szabolcs (Ungheria) Altri progetti | Menu di navigazione48°10′14.56″N 21°29′33.14″E /...

          Discografia di Klaus Schulze Indice Album in studio | Album dal vivo | Singoli | Antologie | Colonne...

          How to make inet_server_addr() return localhost in spite of ::1/128RETURN NEXT in Postgres FunctionConnect to...