+3 votes
247 views
How to see list of packages installed on Linux Ubuntu

in Linux / Unix by (551k points)
reopened | 247 views

1 Answer

+4 votes
Best answer

1. How to list installed packages with a brief description in Linux Ubuntu
2. How to view packages installed on Linux
3. How to save the results to a text file in Linux
4. How to remove unused packages in Linux

One of the many frequent management tasks is knowing in detail what elements are installed in an operating system since this is useful for procedures such as:

  • Licensing organization
  • Software Acquisition
  • Support tasks
  • Audit and more

In the case of Linux, many times we may not know in detail how to know and identify what packages we have in our distributions and that is why today TechnoWikis will clearly give some guidelines to know these details with ease. We will do this analysis in Ubuntu 17 ..


1. How to list installed packages with a brief description in Linux Ubuntu

Step 1

If we wish to display the list of packages that are installed in the system, simply execute the following:
 dpkg-query -l 
Step 2

We will see the following result: image
Step 3

If we only want to see the list of packages without any description, we will execute the following:
 dpkg-query -f '$ {binary: Package} \ n' -W 
As a result we will see this: image

2. How to view packages installed on Linux

Step 1

To know what packages we have installed in our distribution, we will use the following line:
 dpkg --get-selections | grep -v deinstall 
image
Step 2

We can also use the following line:
 apt list –installed 
image

3. How to save the results to a text file in Linux


If for any reason we want the results obtained to be redirected and stored to a text file for later analysis, we will execute the following:
 dpkg --get-selections | grep -v deinstall> TechnoWikis.txt> 
image

We can also use the following line:

 dpkg -l | grep ^ ii | awk '{print $ 2}'> mylist.txt 

4. How to remove unused packages in Linux


It is normal that certain packages are no longer used in Linux and for this they can be eliminated, this will free up disk space, for this task we will execute the following:
 sudo apt-get autoremove 
image

We have seen how easy it is to see in detail what packages we have installed in our Linux distribution and thus have better control over them.


by (3.5m points)
edited

Related questions

+4 votes
1 answer
asked May 9, 2023 in Linux/Unix by backtothefuture (551k points) | 51 views
+3 votes
1 answer
+5 votes
1 answer
asked Sep 25, 2019 in Linux / Unix by backtothefuture (551k points) | 249 views
+4 votes
1 answer
asked Jun 2, 2020 in Linux / Unix by backtothefuture (551k points) | 279 views
+3 votes
1 answer
asked Feb 17, 2020 in Linux / Unix by backtothefuture (551k points) | 279 views
Sponsored articles cost $40 per post. You can contact us via Feedback
10,634 questions
10,766 answers
510 comments
3 users