How to remove a deb without removing its dependencies





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







37















I would like to install the most recent version of boto, which I do via python setup.py install



Yet when I try to remove the old version the following packages also get removed:



apt-get remove python-boto
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
cloud-init cloud-utils euca2ools python-boto


How can I tell the package manager to remove boto, and them mark it as installed externally (or something like that) so that apt won't try to fix the missing dependency?



Thank you,

Maxim.










share|improve this question

























  • Have you tried <code>sudo dpkg --remove python-boto</code>?

    – dkuntz2
    Dec 16 '10 at 14:03


















37















I would like to install the most recent version of boto, which I do via python setup.py install



Yet when I try to remove the old version the following packages also get removed:



apt-get remove python-boto
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
cloud-init cloud-utils euca2ools python-boto


How can I tell the package manager to remove boto, and them mark it as installed externally (or something like that) so that apt won't try to fix the missing dependency?



Thank you,

Maxim.










share|improve this question

























  • Have you tried <code>sudo dpkg --remove python-boto</code>?

    – dkuntz2
    Dec 16 '10 at 14:03














37












37








37


16






I would like to install the most recent version of boto, which I do via python setup.py install



Yet when I try to remove the old version the following packages also get removed:



apt-get remove python-boto
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
cloud-init cloud-utils euca2ools python-boto


How can I tell the package manager to remove boto, and them mark it as installed externally (or something like that) so that apt won't try to fix the missing dependency?



Thank you,

Maxim.










share|improve this question
















I would like to install the most recent version of boto, which I do via python setup.py install



Yet when I try to remove the old version the following packages also get removed:



apt-get remove python-boto
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
cloud-init cloud-utils euca2ools python-boto


How can I tell the package manager to remove boto, and them mark it as installed externally (or something like that) so that apt won't try to fix the missing dependency?



Thank you,

Maxim.







apt






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 11 mins ago









Braiam

52.8k20139226




52.8k20139226










asked Dec 16 '10 at 13:38









Maxim VekslerMaxim Veksler

310139




310139













  • Have you tried <code>sudo dpkg --remove python-boto</code>?

    – dkuntz2
    Dec 16 '10 at 14:03



















  • Have you tried <code>sudo dpkg --remove python-boto</code>?

    – dkuntz2
    Dec 16 '10 at 14:03

















Have you tried <code>sudo dpkg --remove python-boto</code>?

– dkuntz2
Dec 16 '10 at 14:03





Have you tried <code>sudo dpkg --remove python-boto</code>?

– dkuntz2
Dec 16 '10 at 14:03










6 Answers
6






active

oldest

votes


















15














You can create a dummy .deb package using the equivs utility, it will provide the dependency without installing any files. Then just replace the currently installed package to the dummy version using dpkg -i fake.deb.






share|improve this answer

































    53














    Use dpkg directly, not apt-get or aptitude:



    sudo dpkg -r --force-depends "package"





    share|improve this answer


























    • Right but when I will try to use apt to install something it will detected that the package I've removed with dpkg is missing and will reinstall it. The question how do I make apt not want to reinstall it / ignore it's consistency state?

      – Maxim Veksler
      Apr 1 '11 at 10:44



















    15














    I know this is an old post, but since I recently had a similar problem I would like to share my solution in the hopes that someone in the future finds it useful.



    If you installed a package via aptitude it automatically assigns flags to the dependencies (auto) and when you try to remove your package again it tries to remove all its dependencies that have the auto flag still set.



    As you can see in my case it's zabbix that i want to remove:



    uman@mango:~$ sudo aptitude purge zabbix-server-mysql zabbix-frontend-php
    The following packages will be REMOVED:
    apache2{u} dbconfig-common{u} fping{u} javascript-common{u} libhtml-template-perl{u} libiksemel3{u} libjs-prototype{u}
    libjs-scriptaculous{u} libopenipmi0{u} libt1-5{u} mysql-server{u} mysql-server-5.1{u} mysql-server-core-5.1{u} php5{u} php5-gd{u}
    php5-mysql{u} snmpd{u} wwwconfig-common{u} zabbix-frontend-php{p} zabbix-server-mysql{p}
    0 packages upgraded, 0 newly installed, 20 to remove and 0 not upgraded.
    Need to get 0 B of archives. After unpacking 44.9 MB will be freed.
    Do you want to continue? [Y/n/?]


    And if we look up the apache package it looks like this



    uman@mango:~$ aptitude search ^apache2
    i A apache2 - Apache HTTP Server metapackage
    <snip>


    the first flag "i" tells us that apache is installed

    The next flag "A" stands for automatically installed



    So in order to fix this and not having apache, mysql and php uninstalled, we can just remove the auto flag with aptitude like this:



    uman@mango:~$ sudo aptitude unmarkauto apache2 mysql-server php5
    No packages will be installed, upgraded, or removed.
    0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    Need to get 0 B of archives. After unpacking 0 B will be used.


    Now it looks like this when removing the zabbix package:



    uman@mango:~$ sudo aptitude purge zabbix-server-mysql zabbix-frontend-php
    The following packages will be REMOVED:
    dbconfig-common{u} fping{u} javascript-common{u} libiksemel3{u} libjs-prototype{u} libjs-scriptaculous{u} libopenipmi0{u} libt1-5{u}
    php5-gd{u} wwwconfig-common{u} zabbix-frontend-php{p} zabbix-server-mysql{p}
    0 packages upgraded, 0 newly installed, 12 to remove and 0 not upgraded.
    Need to get 0 B of archives. After unpacking 16.6 MB will be freed.
    Do you want to continue? [Y/n/?]


    Please check out the man page for aptitude for more details






    share|improve this answer


























    • This seems like the best answer of all (depending on situation). Shouldn't be too hard to make a command that finds all dependents and pipes them to unmarkauto.

      – johny why
      Sep 12 '18 at 0:41



















    11














    That's exactly what apt-mark hold is for.



    apt-mark hold package_name



    From the documentation:




    hold is used to mark a package as held back, which will prevent the package from being automatically installed, upgraded or removed. The command is only a wrapper around dpkg --set-selections and the state is therefore




    To unhold a package:



    apt-mark unhold package_name






    share|improve this answer



















    • 1





      For my situation, this is the recommended approach.

      – Paulo Coghi
      Jan 10 '16 at 6:05






    • 1





      Unfortunately, this fails to hold dependencies. I.e. if I install packages A and B and they share a common dependency X, holding A will not hold X, and removing B will fail with "E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages."

      – MSalters
      Oct 26 '17 at 12:30



















    3














    AFAIK there is no way to remove a package using APT without also removing those packages that depend on it.



    Reference: http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.en.html






    share|improve this answer
























    • no, this is the one of many purposes for meta-packages

      – RobotHumans
      Dec 30 '10 at 1:07



















    0














    To complete João Pinto's answer, you can use my little script to fix broken package, this script will create dummy package with equivs and install it.
    You can find a article on my blog in french.



    Or directly on gist code .



    To use it:



    $ ./gen-dummy-package.sh --install|i [packageName]+
    # e.g. :
    $ ./gen-dummy-package.sh -i rfkill nome-bluetooth bluez





    share|improve this answer
























      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%2f17745%2fhow-to-remove-a-deb-without-removing-its-dependencies%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      6 Answers
      6






      active

      oldest

      votes








      6 Answers
      6






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      15














      You can create a dummy .deb package using the equivs utility, it will provide the dependency without installing any files. Then just replace the currently installed package to the dummy version using dpkg -i fake.deb.






      share|improve this answer






























        15














        You can create a dummy .deb package using the equivs utility, it will provide the dependency without installing any files. Then just replace the currently installed package to the dummy version using dpkg -i fake.deb.






        share|improve this answer




























          15












          15








          15







          You can create a dummy .deb package using the equivs utility, it will provide the dependency without installing any files. Then just replace the currently installed package to the dummy version using dpkg -i fake.deb.






          share|improve this answer















          You can create a dummy .deb package using the equivs utility, it will provide the dependency without installing any files. Then just replace the currently installed package to the dummy version using dpkg -i fake.deb.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited May 8 '13 at 1:55









          ACK_stoverflow

          15710




          15710










          answered Dec 16 '10 at 15:06









          João PintoJoão Pinto

          14.9k34660




          14.9k34660

























              53














              Use dpkg directly, not apt-get or aptitude:



              sudo dpkg -r --force-depends "package"





              share|improve this answer


























              • Right but when I will try to use apt to install something it will detected that the package I've removed with dpkg is missing and will reinstall it. The question how do I make apt not want to reinstall it / ignore it's consistency state?

                – Maxim Veksler
                Apr 1 '11 at 10:44
















              53














              Use dpkg directly, not apt-get or aptitude:



              sudo dpkg -r --force-depends "package"





              share|improve this answer


























              • Right but when I will try to use apt to install something it will detected that the package I've removed with dpkg is missing and will reinstall it. The question how do I make apt not want to reinstall it / ignore it's consistency state?

                – Maxim Veksler
                Apr 1 '11 at 10:44














              53












              53








              53







              Use dpkg directly, not apt-get or aptitude:



              sudo dpkg -r --force-depends "package"





              share|improve this answer















              Use dpkg directly, not apt-get or aptitude:



              sudo dpkg -r --force-depends "package"






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Apr 9 '11 at 18:29









              8128

              25k22101138




              25k22101138










              answered Mar 31 '11 at 18:17







              user13364




















              • Right but when I will try to use apt to install something it will detected that the package I've removed with dpkg is missing and will reinstall it. The question how do I make apt not want to reinstall it / ignore it's consistency state?

                – Maxim Veksler
                Apr 1 '11 at 10:44



















              • Right but when I will try to use apt to install something it will detected that the package I've removed with dpkg is missing and will reinstall it. The question how do I make apt not want to reinstall it / ignore it's consistency state?

                – Maxim Veksler
                Apr 1 '11 at 10:44

















              Right but when I will try to use apt to install something it will detected that the package I've removed with dpkg is missing and will reinstall it. The question how do I make apt not want to reinstall it / ignore it's consistency state?

              – Maxim Veksler
              Apr 1 '11 at 10:44





              Right but when I will try to use apt to install something it will detected that the package I've removed with dpkg is missing and will reinstall it. The question how do I make apt not want to reinstall it / ignore it's consistency state?

              – Maxim Veksler
              Apr 1 '11 at 10:44











              15














              I know this is an old post, but since I recently had a similar problem I would like to share my solution in the hopes that someone in the future finds it useful.



              If you installed a package via aptitude it automatically assigns flags to the dependencies (auto) and when you try to remove your package again it tries to remove all its dependencies that have the auto flag still set.



              As you can see in my case it's zabbix that i want to remove:



              uman@mango:~$ sudo aptitude purge zabbix-server-mysql zabbix-frontend-php
              The following packages will be REMOVED:
              apache2{u} dbconfig-common{u} fping{u} javascript-common{u} libhtml-template-perl{u} libiksemel3{u} libjs-prototype{u}
              libjs-scriptaculous{u} libopenipmi0{u} libt1-5{u} mysql-server{u} mysql-server-5.1{u} mysql-server-core-5.1{u} php5{u} php5-gd{u}
              php5-mysql{u} snmpd{u} wwwconfig-common{u} zabbix-frontend-php{p} zabbix-server-mysql{p}
              0 packages upgraded, 0 newly installed, 20 to remove and 0 not upgraded.
              Need to get 0 B of archives. After unpacking 44.9 MB will be freed.
              Do you want to continue? [Y/n/?]


              And if we look up the apache package it looks like this



              uman@mango:~$ aptitude search ^apache2
              i A apache2 - Apache HTTP Server metapackage
              <snip>


              the first flag "i" tells us that apache is installed

              The next flag "A" stands for automatically installed



              So in order to fix this and not having apache, mysql and php uninstalled, we can just remove the auto flag with aptitude like this:



              uman@mango:~$ sudo aptitude unmarkauto apache2 mysql-server php5
              No packages will be installed, upgraded, or removed.
              0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
              Need to get 0 B of archives. After unpacking 0 B will be used.


              Now it looks like this when removing the zabbix package:



              uman@mango:~$ sudo aptitude purge zabbix-server-mysql zabbix-frontend-php
              The following packages will be REMOVED:
              dbconfig-common{u} fping{u} javascript-common{u} libiksemel3{u} libjs-prototype{u} libjs-scriptaculous{u} libopenipmi0{u} libt1-5{u}
              php5-gd{u} wwwconfig-common{u} zabbix-frontend-php{p} zabbix-server-mysql{p}
              0 packages upgraded, 0 newly installed, 12 to remove and 0 not upgraded.
              Need to get 0 B of archives. After unpacking 16.6 MB will be freed.
              Do you want to continue? [Y/n/?]


              Please check out the man page for aptitude for more details






              share|improve this answer


























              • This seems like the best answer of all (depending on situation). Shouldn't be too hard to make a command that finds all dependents and pipes them to unmarkauto.

                – johny why
                Sep 12 '18 at 0:41
















              15














              I know this is an old post, but since I recently had a similar problem I would like to share my solution in the hopes that someone in the future finds it useful.



              If you installed a package via aptitude it automatically assigns flags to the dependencies (auto) and when you try to remove your package again it tries to remove all its dependencies that have the auto flag still set.



              As you can see in my case it's zabbix that i want to remove:



              uman@mango:~$ sudo aptitude purge zabbix-server-mysql zabbix-frontend-php
              The following packages will be REMOVED:
              apache2{u} dbconfig-common{u} fping{u} javascript-common{u} libhtml-template-perl{u} libiksemel3{u} libjs-prototype{u}
              libjs-scriptaculous{u} libopenipmi0{u} libt1-5{u} mysql-server{u} mysql-server-5.1{u} mysql-server-core-5.1{u} php5{u} php5-gd{u}
              php5-mysql{u} snmpd{u} wwwconfig-common{u} zabbix-frontend-php{p} zabbix-server-mysql{p}
              0 packages upgraded, 0 newly installed, 20 to remove and 0 not upgraded.
              Need to get 0 B of archives. After unpacking 44.9 MB will be freed.
              Do you want to continue? [Y/n/?]


              And if we look up the apache package it looks like this



              uman@mango:~$ aptitude search ^apache2
              i A apache2 - Apache HTTP Server metapackage
              <snip>


              the first flag "i" tells us that apache is installed

              The next flag "A" stands for automatically installed



              So in order to fix this and not having apache, mysql and php uninstalled, we can just remove the auto flag with aptitude like this:



              uman@mango:~$ sudo aptitude unmarkauto apache2 mysql-server php5
              No packages will be installed, upgraded, or removed.
              0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
              Need to get 0 B of archives. After unpacking 0 B will be used.


              Now it looks like this when removing the zabbix package:



              uman@mango:~$ sudo aptitude purge zabbix-server-mysql zabbix-frontend-php
              The following packages will be REMOVED:
              dbconfig-common{u} fping{u} javascript-common{u} libiksemel3{u} libjs-prototype{u} libjs-scriptaculous{u} libopenipmi0{u} libt1-5{u}
              php5-gd{u} wwwconfig-common{u} zabbix-frontend-php{p} zabbix-server-mysql{p}
              0 packages upgraded, 0 newly installed, 12 to remove and 0 not upgraded.
              Need to get 0 B of archives. After unpacking 16.6 MB will be freed.
              Do you want to continue? [Y/n/?]


              Please check out the man page for aptitude for more details






              share|improve this answer


























              • This seems like the best answer of all (depending on situation). Shouldn't be too hard to make a command that finds all dependents and pipes them to unmarkauto.

                – johny why
                Sep 12 '18 at 0:41














              15












              15








              15







              I know this is an old post, but since I recently had a similar problem I would like to share my solution in the hopes that someone in the future finds it useful.



              If you installed a package via aptitude it automatically assigns flags to the dependencies (auto) and when you try to remove your package again it tries to remove all its dependencies that have the auto flag still set.



              As you can see in my case it's zabbix that i want to remove:



              uman@mango:~$ sudo aptitude purge zabbix-server-mysql zabbix-frontend-php
              The following packages will be REMOVED:
              apache2{u} dbconfig-common{u} fping{u} javascript-common{u} libhtml-template-perl{u} libiksemel3{u} libjs-prototype{u}
              libjs-scriptaculous{u} libopenipmi0{u} libt1-5{u} mysql-server{u} mysql-server-5.1{u} mysql-server-core-5.1{u} php5{u} php5-gd{u}
              php5-mysql{u} snmpd{u} wwwconfig-common{u} zabbix-frontend-php{p} zabbix-server-mysql{p}
              0 packages upgraded, 0 newly installed, 20 to remove and 0 not upgraded.
              Need to get 0 B of archives. After unpacking 44.9 MB will be freed.
              Do you want to continue? [Y/n/?]


              And if we look up the apache package it looks like this



              uman@mango:~$ aptitude search ^apache2
              i A apache2 - Apache HTTP Server metapackage
              <snip>


              the first flag "i" tells us that apache is installed

              The next flag "A" stands for automatically installed



              So in order to fix this and not having apache, mysql and php uninstalled, we can just remove the auto flag with aptitude like this:



              uman@mango:~$ sudo aptitude unmarkauto apache2 mysql-server php5
              No packages will be installed, upgraded, or removed.
              0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
              Need to get 0 B of archives. After unpacking 0 B will be used.


              Now it looks like this when removing the zabbix package:



              uman@mango:~$ sudo aptitude purge zabbix-server-mysql zabbix-frontend-php
              The following packages will be REMOVED:
              dbconfig-common{u} fping{u} javascript-common{u} libiksemel3{u} libjs-prototype{u} libjs-scriptaculous{u} libopenipmi0{u} libt1-5{u}
              php5-gd{u} wwwconfig-common{u} zabbix-frontend-php{p} zabbix-server-mysql{p}
              0 packages upgraded, 0 newly installed, 12 to remove and 0 not upgraded.
              Need to get 0 B of archives. After unpacking 16.6 MB will be freed.
              Do you want to continue? [Y/n/?]


              Please check out the man page for aptitude for more details






              share|improve this answer















              I know this is an old post, but since I recently had a similar problem I would like to share my solution in the hopes that someone in the future finds it useful.



              If you installed a package via aptitude it automatically assigns flags to the dependencies (auto) and when you try to remove your package again it tries to remove all its dependencies that have the auto flag still set.



              As you can see in my case it's zabbix that i want to remove:



              uman@mango:~$ sudo aptitude purge zabbix-server-mysql zabbix-frontend-php
              The following packages will be REMOVED:
              apache2{u} dbconfig-common{u} fping{u} javascript-common{u} libhtml-template-perl{u} libiksemel3{u} libjs-prototype{u}
              libjs-scriptaculous{u} libopenipmi0{u} libt1-5{u} mysql-server{u} mysql-server-5.1{u} mysql-server-core-5.1{u} php5{u} php5-gd{u}
              php5-mysql{u} snmpd{u} wwwconfig-common{u} zabbix-frontend-php{p} zabbix-server-mysql{p}
              0 packages upgraded, 0 newly installed, 20 to remove and 0 not upgraded.
              Need to get 0 B of archives. After unpacking 44.9 MB will be freed.
              Do you want to continue? [Y/n/?]


              And if we look up the apache package it looks like this



              uman@mango:~$ aptitude search ^apache2
              i A apache2 - Apache HTTP Server metapackage
              <snip>


              the first flag "i" tells us that apache is installed

              The next flag "A" stands for automatically installed



              So in order to fix this and not having apache, mysql and php uninstalled, we can just remove the auto flag with aptitude like this:



              uman@mango:~$ sudo aptitude unmarkauto apache2 mysql-server php5
              No packages will be installed, upgraded, or removed.
              0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
              Need to get 0 B of archives. After unpacking 0 B will be used.


              Now it looks like this when removing the zabbix package:



              uman@mango:~$ sudo aptitude purge zabbix-server-mysql zabbix-frontend-php
              The following packages will be REMOVED:
              dbconfig-common{u} fping{u} javascript-common{u} libiksemel3{u} libjs-prototype{u} libjs-scriptaculous{u} libopenipmi0{u} libt1-5{u}
              php5-gd{u} wwwconfig-common{u} zabbix-frontend-php{p} zabbix-server-mysql{p}
              0 packages upgraded, 0 newly installed, 12 to remove and 0 not upgraded.
              Need to get 0 B of archives. After unpacking 16.6 MB will be freed.
              Do you want to continue? [Y/n/?]


              Please check out the man page for aptitude for more details







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Jan 14 '15 at 10:07

























              answered Jan 7 '13 at 15:26









              David BerkanDavid Berkan

              15114




              15114













              • This seems like the best answer of all (depending on situation). Shouldn't be too hard to make a command that finds all dependents and pipes them to unmarkauto.

                – johny why
                Sep 12 '18 at 0:41



















              • This seems like the best answer of all (depending on situation). Shouldn't be too hard to make a command that finds all dependents and pipes them to unmarkauto.

                – johny why
                Sep 12 '18 at 0:41

















              This seems like the best answer of all (depending on situation). Shouldn't be too hard to make a command that finds all dependents and pipes them to unmarkauto.

              – johny why
              Sep 12 '18 at 0:41





              This seems like the best answer of all (depending on situation). Shouldn't be too hard to make a command that finds all dependents and pipes them to unmarkauto.

              – johny why
              Sep 12 '18 at 0:41











              11














              That's exactly what apt-mark hold is for.



              apt-mark hold package_name



              From the documentation:




              hold is used to mark a package as held back, which will prevent the package from being automatically installed, upgraded or removed. The command is only a wrapper around dpkg --set-selections and the state is therefore




              To unhold a package:



              apt-mark unhold package_name






              share|improve this answer



















              • 1





                For my situation, this is the recommended approach.

                – Paulo Coghi
                Jan 10 '16 at 6:05






              • 1





                Unfortunately, this fails to hold dependencies. I.e. if I install packages A and B and they share a common dependency X, holding A will not hold X, and removing B will fail with "E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages."

                – MSalters
                Oct 26 '17 at 12:30
















              11














              That's exactly what apt-mark hold is for.



              apt-mark hold package_name



              From the documentation:




              hold is used to mark a package as held back, which will prevent the package from being automatically installed, upgraded or removed. The command is only a wrapper around dpkg --set-selections and the state is therefore




              To unhold a package:



              apt-mark unhold package_name






              share|improve this answer



















              • 1





                For my situation, this is the recommended approach.

                – Paulo Coghi
                Jan 10 '16 at 6:05






              • 1





                Unfortunately, this fails to hold dependencies. I.e. if I install packages A and B and they share a common dependency X, holding A will not hold X, and removing B will fail with "E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages."

                – MSalters
                Oct 26 '17 at 12:30














              11












              11








              11







              That's exactly what apt-mark hold is for.



              apt-mark hold package_name



              From the documentation:




              hold is used to mark a package as held back, which will prevent the package from being automatically installed, upgraded or removed. The command is only a wrapper around dpkg --set-selections and the state is therefore




              To unhold a package:



              apt-mark unhold package_name






              share|improve this answer













              That's exactly what apt-mark hold is for.



              apt-mark hold package_name



              From the documentation:




              hold is used to mark a package as held back, which will prevent the package from being automatically installed, upgraded or removed. The command is only a wrapper around dpkg --set-selections and the state is therefore




              To unhold a package:



              apt-mark unhold package_name







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Nov 9 '15 at 16:07









              MarcioMarcio

              21124




              21124








              • 1





                For my situation, this is the recommended approach.

                – Paulo Coghi
                Jan 10 '16 at 6:05






              • 1





                Unfortunately, this fails to hold dependencies. I.e. if I install packages A and B and they share a common dependency X, holding A will not hold X, and removing B will fail with "E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages."

                – MSalters
                Oct 26 '17 at 12:30














              • 1





                For my situation, this is the recommended approach.

                – Paulo Coghi
                Jan 10 '16 at 6:05






              • 1





                Unfortunately, this fails to hold dependencies. I.e. if I install packages A and B and they share a common dependency X, holding A will not hold X, and removing B will fail with "E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages."

                – MSalters
                Oct 26 '17 at 12:30








              1




              1





              For my situation, this is the recommended approach.

              – Paulo Coghi
              Jan 10 '16 at 6:05





              For my situation, this is the recommended approach.

              – Paulo Coghi
              Jan 10 '16 at 6:05




              1




              1





              Unfortunately, this fails to hold dependencies. I.e. if I install packages A and B and they share a common dependency X, holding A will not hold X, and removing B will fail with "E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages."

              – MSalters
              Oct 26 '17 at 12:30





              Unfortunately, this fails to hold dependencies. I.e. if I install packages A and B and they share a common dependency X, holding A will not hold X, and removing B will fail with "E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages."

              – MSalters
              Oct 26 '17 at 12:30











              3














              AFAIK there is no way to remove a package using APT without also removing those packages that depend on it.



              Reference: http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.en.html






              share|improve this answer
























              • no, this is the one of many purposes for meta-packages

                – RobotHumans
                Dec 30 '10 at 1:07
















              3














              AFAIK there is no way to remove a package using APT without also removing those packages that depend on it.



              Reference: http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.en.html






              share|improve this answer
























              • no, this is the one of many purposes for meta-packages

                – RobotHumans
                Dec 30 '10 at 1:07














              3












              3








              3







              AFAIK there is no way to remove a package using APT without also removing those packages that depend on it.



              Reference: http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.en.html






              share|improve this answer













              AFAIK there is no way to remove a package using APT without also removing those packages that depend on it.



              Reference: http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.en.html







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Dec 16 '10 at 14:14









              aneeshepaneeshep

              22.7k115674




              22.7k115674













              • no, this is the one of many purposes for meta-packages

                – RobotHumans
                Dec 30 '10 at 1:07



















              • no, this is the one of many purposes for meta-packages

                – RobotHumans
                Dec 30 '10 at 1:07

















              no, this is the one of many purposes for meta-packages

              – RobotHumans
              Dec 30 '10 at 1:07





              no, this is the one of many purposes for meta-packages

              – RobotHumans
              Dec 30 '10 at 1:07











              0














              To complete João Pinto's answer, you can use my little script to fix broken package, this script will create dummy package with equivs and install it.
              You can find a article on my blog in french.



              Or directly on gist code .



              To use it:



              $ ./gen-dummy-package.sh --install|i [packageName]+
              # e.g. :
              $ ./gen-dummy-package.sh -i rfkill nome-bluetooth bluez





              share|improve this answer




























                0














                To complete João Pinto's answer, you can use my little script to fix broken package, this script will create dummy package with equivs and install it.
                You can find a article on my blog in french.



                Or directly on gist code .



                To use it:



                $ ./gen-dummy-package.sh --install|i [packageName]+
                # e.g. :
                $ ./gen-dummy-package.sh -i rfkill nome-bluetooth bluez





                share|improve this answer


























                  0












                  0








                  0







                  To complete João Pinto's answer, you can use my little script to fix broken package, this script will create dummy package with equivs and install it.
                  You can find a article on my blog in french.



                  Or directly on gist code .



                  To use it:



                  $ ./gen-dummy-package.sh --install|i [packageName]+
                  # e.g. :
                  $ ./gen-dummy-package.sh -i rfkill nome-bluetooth bluez





                  share|improve this answer













                  To complete João Pinto's answer, you can use my little script to fix broken package, this script will create dummy package with equivs and install it.
                  You can find a article on my blog in french.



                  Or directly on gist code .



                  To use it:



                  $ ./gen-dummy-package.sh --install|i [packageName]+
                  # e.g. :
                  $ ./gen-dummy-package.sh -i rfkill nome-bluetooth bluez






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 3 '15 at 18:47









                  heralightheralight

                  21625




                  21625






























                      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%2f17745%2fhow-to-remove-a-deb-without-removing-its-dependencies%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

                      香粉寮

                      GameSpot