How to find reason for orphaned packages in apt-get autoremove?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
3
down vote

favorite
1












In general, apt-get autoremove removes packages that have been installed as a dependency of some other package which is now no longer installed. I noticed that my list of orphaned packages includes things like emacs24 and tmux, which I definitely want to keep. Is it possible to find out which other (now missing) package was responsible for installing them in the first place?










share|improve this question

























    up vote
    3
    down vote

    favorite
    1












    In general, apt-get autoremove removes packages that have been installed as a dependency of some other package which is now no longer installed. I noticed that my list of orphaned packages includes things like emacs24 and tmux, which I definitely want to keep. Is it possible to find out which other (now missing) package was responsible for installing them in the first place?










    share|improve this question























      up vote
      3
      down vote

      favorite
      1









      up vote
      3
      down vote

      favorite
      1






      1





      In general, apt-get autoremove removes packages that have been installed as a dependency of some other package which is now no longer installed. I noticed that my list of orphaned packages includes things like emacs24 and tmux, which I definitely want to keep. Is it possible to find out which other (now missing) package was responsible for installing them in the first place?










      share|improve this question













      In general, apt-get autoremove removes packages that have been installed as a dependency of some other package which is now no longer installed. I noticed that my list of orphaned packages includes things like emacs24 and tmux, which I definitely want to keep. Is it possible to find out which other (now missing) package was responsible for installing them in the first place?







      apt package-management






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 5 '17 at 10:50









      bluenote10

      906819




      906819




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          4
          down vote



          accepted










          Automatically:



          One of the solutions is to use aptitude, first install it:



          sudo apt install aptitude


          Now to find out why a package has been installed on your Ubuntu you can run:



          aptitude why pkgname 


          However note that:




          The dependency that aptitude produced in this case is only a suggestion. This is because no package currently installed on this computer depends on or recommends the "pkgname".




          Also:




          aptitude why does not perform full dependency resolution; it only displays
          direct relationships between packages.




          In conclusion if you can't find a related package, then there is a high chance that this package has been installed as a dependency or recommendation of on of the other packages that is going to be removed using apt autoremove, or somehow is related to this chain.



          Manually



          First let's produce a situation then try to find out why a package has been installed, I first installed vlc on my system:



          sudo apt install vlc


          after that I only remove the vlc itself using sudo apt remove vlc, now if I run sudo apt autoremove I'll get:



          libqt5x11extras5 vlc-bin vlc-plugin-qt ...


          let's first check one of them using aptitude:



          $ aptitude why libqt5x11extras5
          aptitude why libqt5x11extras5
          i xorg Depends xterm | x-terminal-emulator
          p qterminal Provides x-terminal-emulator


          however the other one because of a direct dependency chain will work fine:



          $ aptitude why vlc-bin
          c vlc Depends vlc-bin


          pay attention to the c it means that the package was deleted but its configuration files still lives on my system so there is a high chance (in this case 100%) that vlc-bin was installed by vlc.



          Now let's back to our job and findout why libqt5x11extras5 lives on our Ubuntu:



          $ apt-cache rdepends libqt5x11extras5 | xargs dpkg -l |& grep -e '^i' -e '^rc'


          using apt-cache rdepends I'm looking for all packages which has dependency on libqt5x11extras5, then I'm looking for the ones which are installed or was installed on my system using dpkg with the combination of grep, the result is:



          ii libqt5x11extras5
          ii vlc-plugin-qt


          see? we found out that this package was related to another package that is in our autoremove list: vlc-plugin-qt, at the end:



          $ aptitude why vlc-plugin-qt
          c vlc


          and we came back to the vlc.






          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',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            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%2f943287%2fhow-to-find-reason-for-orphaned-packages-in-apt-get-autoremove%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            4
            down vote



            accepted










            Automatically:



            One of the solutions is to use aptitude, first install it:



            sudo apt install aptitude


            Now to find out why a package has been installed on your Ubuntu you can run:



            aptitude why pkgname 


            However note that:




            The dependency that aptitude produced in this case is only a suggestion. This is because no package currently installed on this computer depends on or recommends the "pkgname".




            Also:




            aptitude why does not perform full dependency resolution; it only displays
            direct relationships between packages.




            In conclusion if you can't find a related package, then there is a high chance that this package has been installed as a dependency or recommendation of on of the other packages that is going to be removed using apt autoremove, or somehow is related to this chain.



            Manually



            First let's produce a situation then try to find out why a package has been installed, I first installed vlc on my system:



            sudo apt install vlc


            after that I only remove the vlc itself using sudo apt remove vlc, now if I run sudo apt autoremove I'll get:



            libqt5x11extras5 vlc-bin vlc-plugin-qt ...


            let's first check one of them using aptitude:



            $ aptitude why libqt5x11extras5
            aptitude why libqt5x11extras5
            i xorg Depends xterm | x-terminal-emulator
            p qterminal Provides x-terminal-emulator


            however the other one because of a direct dependency chain will work fine:



            $ aptitude why vlc-bin
            c vlc Depends vlc-bin


            pay attention to the c it means that the package was deleted but its configuration files still lives on my system so there is a high chance (in this case 100%) that vlc-bin was installed by vlc.



            Now let's back to our job and findout why libqt5x11extras5 lives on our Ubuntu:



            $ apt-cache rdepends libqt5x11extras5 | xargs dpkg -l |& grep -e '^i' -e '^rc'


            using apt-cache rdepends I'm looking for all packages which has dependency on libqt5x11extras5, then I'm looking for the ones which are installed or was installed on my system using dpkg with the combination of grep, the result is:



            ii libqt5x11extras5
            ii vlc-plugin-qt


            see? we found out that this package was related to another package that is in our autoremove list: vlc-plugin-qt, at the end:



            $ aptitude why vlc-plugin-qt
            c vlc


            and we came back to the vlc.






            share|improve this answer
























              up vote
              4
              down vote



              accepted










              Automatically:



              One of the solutions is to use aptitude, first install it:



              sudo apt install aptitude


              Now to find out why a package has been installed on your Ubuntu you can run:



              aptitude why pkgname 


              However note that:




              The dependency that aptitude produced in this case is only a suggestion. This is because no package currently installed on this computer depends on or recommends the "pkgname".




              Also:




              aptitude why does not perform full dependency resolution; it only displays
              direct relationships between packages.




              In conclusion if you can't find a related package, then there is a high chance that this package has been installed as a dependency or recommendation of on of the other packages that is going to be removed using apt autoremove, or somehow is related to this chain.



              Manually



              First let's produce a situation then try to find out why a package has been installed, I first installed vlc on my system:



              sudo apt install vlc


              after that I only remove the vlc itself using sudo apt remove vlc, now if I run sudo apt autoremove I'll get:



              libqt5x11extras5 vlc-bin vlc-plugin-qt ...


              let's first check one of them using aptitude:



              $ aptitude why libqt5x11extras5
              aptitude why libqt5x11extras5
              i xorg Depends xterm | x-terminal-emulator
              p qterminal Provides x-terminal-emulator


              however the other one because of a direct dependency chain will work fine:



              $ aptitude why vlc-bin
              c vlc Depends vlc-bin


              pay attention to the c it means that the package was deleted but its configuration files still lives on my system so there is a high chance (in this case 100%) that vlc-bin was installed by vlc.



              Now let's back to our job and findout why libqt5x11extras5 lives on our Ubuntu:



              $ apt-cache rdepends libqt5x11extras5 | xargs dpkg -l |& grep -e '^i' -e '^rc'


              using apt-cache rdepends I'm looking for all packages which has dependency on libqt5x11extras5, then I'm looking for the ones which are installed or was installed on my system using dpkg with the combination of grep, the result is:



              ii libqt5x11extras5
              ii vlc-plugin-qt


              see? we found out that this package was related to another package that is in our autoremove list: vlc-plugin-qt, at the end:



              $ aptitude why vlc-plugin-qt
              c vlc


              and we came back to the vlc.






              share|improve this answer






















                up vote
                4
                down vote



                accepted







                up vote
                4
                down vote



                accepted






                Automatically:



                One of the solutions is to use aptitude, first install it:



                sudo apt install aptitude


                Now to find out why a package has been installed on your Ubuntu you can run:



                aptitude why pkgname 


                However note that:




                The dependency that aptitude produced in this case is only a suggestion. This is because no package currently installed on this computer depends on or recommends the "pkgname".




                Also:




                aptitude why does not perform full dependency resolution; it only displays
                direct relationships between packages.




                In conclusion if you can't find a related package, then there is a high chance that this package has been installed as a dependency or recommendation of on of the other packages that is going to be removed using apt autoremove, or somehow is related to this chain.



                Manually



                First let's produce a situation then try to find out why a package has been installed, I first installed vlc on my system:



                sudo apt install vlc


                after that I only remove the vlc itself using sudo apt remove vlc, now if I run sudo apt autoremove I'll get:



                libqt5x11extras5 vlc-bin vlc-plugin-qt ...


                let's first check one of them using aptitude:



                $ aptitude why libqt5x11extras5
                aptitude why libqt5x11extras5
                i xorg Depends xterm | x-terminal-emulator
                p qterminal Provides x-terminal-emulator


                however the other one because of a direct dependency chain will work fine:



                $ aptitude why vlc-bin
                c vlc Depends vlc-bin


                pay attention to the c it means that the package was deleted but its configuration files still lives on my system so there is a high chance (in this case 100%) that vlc-bin was installed by vlc.



                Now let's back to our job and findout why libqt5x11extras5 lives on our Ubuntu:



                $ apt-cache rdepends libqt5x11extras5 | xargs dpkg -l |& grep -e '^i' -e '^rc'


                using apt-cache rdepends I'm looking for all packages which has dependency on libqt5x11extras5, then I'm looking for the ones which are installed or was installed on my system using dpkg with the combination of grep, the result is:



                ii libqt5x11extras5
                ii vlc-plugin-qt


                see? we found out that this package was related to another package that is in our autoremove list: vlc-plugin-qt, at the end:



                $ aptitude why vlc-plugin-qt
                c vlc


                and we came back to the vlc.






                share|improve this answer












                Automatically:



                One of the solutions is to use aptitude, first install it:



                sudo apt install aptitude


                Now to find out why a package has been installed on your Ubuntu you can run:



                aptitude why pkgname 


                However note that:




                The dependency that aptitude produced in this case is only a suggestion. This is because no package currently installed on this computer depends on or recommends the "pkgname".




                Also:




                aptitude why does not perform full dependency resolution; it only displays
                direct relationships between packages.




                In conclusion if you can't find a related package, then there is a high chance that this package has been installed as a dependency or recommendation of on of the other packages that is going to be removed using apt autoremove, or somehow is related to this chain.



                Manually



                First let's produce a situation then try to find out why a package has been installed, I first installed vlc on my system:



                sudo apt install vlc


                after that I only remove the vlc itself using sudo apt remove vlc, now if I run sudo apt autoremove I'll get:



                libqt5x11extras5 vlc-bin vlc-plugin-qt ...


                let's first check one of them using aptitude:



                $ aptitude why libqt5x11extras5
                aptitude why libqt5x11extras5
                i xorg Depends xterm | x-terminal-emulator
                p qterminal Provides x-terminal-emulator


                however the other one because of a direct dependency chain will work fine:



                $ aptitude why vlc-bin
                c vlc Depends vlc-bin


                pay attention to the c it means that the package was deleted but its configuration files still lives on my system so there is a high chance (in this case 100%) that vlc-bin was installed by vlc.



                Now let's back to our job and findout why libqt5x11extras5 lives on our Ubuntu:



                $ apt-cache rdepends libqt5x11extras5 | xargs dpkg -l |& grep -e '^i' -e '^rc'


                using apt-cache rdepends I'm looking for all packages which has dependency on libqt5x11extras5, then I'm looking for the ones which are installed or was installed on my system using dpkg with the combination of grep, the result is:



                ii libqt5x11extras5
                ii vlc-plugin-qt


                see? we found out that this package was related to another package that is in our autoremove list: vlc-plugin-qt, at the end:



                $ aptitude why vlc-plugin-qt
                c vlc


                and we came back to the vlc.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Aug 5 '17 at 11:20









                Ravexina

                28.4k146897




                28.4k146897



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f943287%2fhow-to-find-reason-for-orphaned-packages-in-apt-get-autoremove%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    pylint3 and pip3 broken

                    Missing snmpget and snmpwalk

                    How to enroll fingerprints to Ubuntu 17.10 with VFS491