How to list packages not installed by apt-get? [duplicate]












2















This question already has an answer here:




  • How can I get a list of files on my computer that are not “owned” by any package?

    3 answers




Using apt list --installed one can get a list of packages installed by apt-get command. However, I would like to get a list of all packages installed in some other way e.g. by some script. Is this possible to get?










share|improve this question













marked as duplicate by N0rbert, karel, Eric Carvalho, Kulfy, Elder Geek Dec 24 '18 at 18:44


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • If they were installed by a script - the script probably calls the apt tools anyway to install packages (ie. apt, apt-get or dpkg so to the system they are installed the same way. Are you asking about packages installed to meet dependencies?
    – guiverc
    Dec 24 '18 at 11:27
















2















This question already has an answer here:




  • How can I get a list of files on my computer that are not “owned” by any package?

    3 answers




Using apt list --installed one can get a list of packages installed by apt-get command. However, I would like to get a list of all packages installed in some other way e.g. by some script. Is this possible to get?










share|improve this question













marked as duplicate by N0rbert, karel, Eric Carvalho, Kulfy, Elder Geek Dec 24 '18 at 18:44


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • If they were installed by a script - the script probably calls the apt tools anyway to install packages (ie. apt, apt-get or dpkg so to the system they are installed the same way. Are you asking about packages installed to meet dependencies?
    – guiverc
    Dec 24 '18 at 11:27














2












2








2








This question already has an answer here:




  • How can I get a list of files on my computer that are not “owned” by any package?

    3 answers




Using apt list --installed one can get a list of packages installed by apt-get command. However, I would like to get a list of all packages installed in some other way e.g. by some script. Is this possible to get?










share|improve this question














This question already has an answer here:




  • How can I get a list of files on my computer that are not “owned” by any package?

    3 answers




Using apt list --installed one can get a list of packages installed by apt-get command. However, I would like to get a list of all packages installed in some other way e.g. by some script. Is this possible to get?





This question already has an answer here:




  • How can I get a list of files on my computer that are not “owned” by any package?

    3 answers








18.04






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 24 '18 at 9:50









milijanmilijan

141




141




marked as duplicate by N0rbert, karel, Eric Carvalho, Kulfy, Elder Geek Dec 24 '18 at 18:44


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by N0rbert, karel, Eric Carvalho, Kulfy, Elder Geek Dec 24 '18 at 18:44


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • If they were installed by a script - the script probably calls the apt tools anyway to install packages (ie. apt, apt-get or dpkg so to the system they are installed the same way. Are you asking about packages installed to meet dependencies?
    – guiverc
    Dec 24 '18 at 11:27


















  • If they were installed by a script - the script probably calls the apt tools anyway to install packages (ie. apt, apt-get or dpkg so to the system they are installed the same way. Are you asking about packages installed to meet dependencies?
    – guiverc
    Dec 24 '18 at 11:27
















If they were installed by a script - the script probably calls the apt tools anyway to install packages (ie. apt, apt-get or dpkg so to the system they are installed the same way. Are you asking about packages installed to meet dependencies?
– guiverc
Dec 24 '18 at 11:27




If they were installed by a script - the script probably calls the apt tools anyway to install packages (ie. apt, apt-get or dpkg so to the system they are installed the same way. Are you asking about packages installed to meet dependencies?
– guiverc
Dec 24 '18 at 11:27










1 Answer
1






active

oldest

votes


















0














Personally I have checked this with the command below.

It recursively finds files in common directories and then calls dpkg --search (see man dpkg) on found file and redirects error output to the file:



sudo find /bin /boot /etc /lib /lib64 /opt /sbin /srv /usr /var -type f 
-exec dpkg -S {} ; 2> ~/not-from-apt.out


Its stdout contains lines with files from APT as shown below




coreutils: /bin/cat



but its stderr (which is redirected to file) contains lines with files not from APT as shown below:




dpkg-query: no path found matching pattern /boot/grub/grub.cfg



Please note that this method is rough. You need to grep the resulting file for executables or customize the list of directories to search.






share|improve this answer




























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Personally I have checked this with the command below.

    It recursively finds files in common directories and then calls dpkg --search (see man dpkg) on found file and redirects error output to the file:



    sudo find /bin /boot /etc /lib /lib64 /opt /sbin /srv /usr /var -type f 
    -exec dpkg -S {} ; 2> ~/not-from-apt.out


    Its stdout contains lines with files from APT as shown below




    coreutils: /bin/cat



    but its stderr (which is redirected to file) contains lines with files not from APT as shown below:




    dpkg-query: no path found matching pattern /boot/grub/grub.cfg



    Please note that this method is rough. You need to grep the resulting file for executables or customize the list of directories to search.






    share|improve this answer


























      0














      Personally I have checked this with the command below.

      It recursively finds files in common directories and then calls dpkg --search (see man dpkg) on found file and redirects error output to the file:



      sudo find /bin /boot /etc /lib /lib64 /opt /sbin /srv /usr /var -type f 
      -exec dpkg -S {} ; 2> ~/not-from-apt.out


      Its stdout contains lines with files from APT as shown below




      coreutils: /bin/cat



      but its stderr (which is redirected to file) contains lines with files not from APT as shown below:




      dpkg-query: no path found matching pattern /boot/grub/grub.cfg



      Please note that this method is rough. You need to grep the resulting file for executables or customize the list of directories to search.






      share|improve this answer
























        0












        0








        0






        Personally I have checked this with the command below.

        It recursively finds files in common directories and then calls dpkg --search (see man dpkg) on found file and redirects error output to the file:



        sudo find /bin /boot /etc /lib /lib64 /opt /sbin /srv /usr /var -type f 
        -exec dpkg -S {} ; 2> ~/not-from-apt.out


        Its stdout contains lines with files from APT as shown below




        coreutils: /bin/cat



        but its stderr (which is redirected to file) contains lines with files not from APT as shown below:




        dpkg-query: no path found matching pattern /boot/grub/grub.cfg



        Please note that this method is rough. You need to grep the resulting file for executables or customize the list of directories to search.






        share|improve this answer












        Personally I have checked this with the command below.

        It recursively finds files in common directories and then calls dpkg --search (see man dpkg) on found file and redirects error output to the file:



        sudo find /bin /boot /etc /lib /lib64 /opt /sbin /srv /usr /var -type f 
        -exec dpkg -S {} ; 2> ~/not-from-apt.out


        Its stdout contains lines with files from APT as shown below




        coreutils: /bin/cat



        but its stderr (which is redirected to file) contains lines with files not from APT as shown below:




        dpkg-query: no path found matching pattern /boot/grub/grub.cfg



        Please note that this method is rough. You need to grep the resulting file for executables or customize the list of directories to search.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 24 '18 at 10:26









        N0rbertN0rbert

        21.5k547101




        21.5k547101















            Popular posts from this blog

            flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

            Mangá

             ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕