Wednesday, May 7, 2014

View Information about installed packages in Debian Based Dostro(Ubuntu/Lubuntu).

Some times we come to situations where we want to get information e.g. check if package is installed or not, if installed then all information related to that one.


Today, we are going to discuss the same on Lubuntu 14.04.There can be number of ways as in linux we have flexibility use number of commands and combined one to get desired results. Here, we will discuss about two most common methods i.e.

1.) Using dpkg to get list of all installed packages.

2.) View all information about installed package.


1.) Using dpkg to get list of all installed packages.

               dpkg(Debian Package Management System) is a package manager for all debian based systems. It is used to install, remove and list all the information about .deb packages. Mostly, dpkg package gets installed by default during installation time.

      a.) View All installed Software using dpkg -l:

                 In Below example I have used head to get just first few lines of output. Use without "head" option to get full list.
Fig-1 Using -l option
               Removing, first few unwanted lines using "sed".

Fig-2

              You can also save output to a file for later as below:

Fig-3
         
             Get Details with Name-Version-Arch together:
Fig-4

           Get total count of installed packages:

Fig-5

      b.) View All installed Software using dpkg --get-selections:

                  Another option we have available with dpkg is "--get-selections"(without quotes).
Fig-6
                 Get count using "wc" and you can compare this with last one :).
Fig-7


2.) View all information about installed package.

          Once, we get the list of installed packages, then we would really like to know more about particular package. So, we have different options available for the same. I am going share the tricks that I know :).
        

             a.) Using aptitude show "package" :

Fig-8

            b.) Using apt-cache show "package" :

Fig-9
Along with all above information, here I also want to share one more tip that can be more helpful. Sometime, you have a package installed and you don't know about the list of files created by that package. In that case "dpkg-query" can be tricky.

Suppose I have lighttpd installed and I want to get the list of all the files associated with this. Use below command as below :

Fig-10

Note: It will work on all debian based distros.

Integrate Jenkins with Azure Key Vault

Jenkins has been one of the most used CI/CD tools. For every tool which we are using in our daily life, it becomes really challenges when ...