• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » List All Installed Packages on SSH (Ubuntu/deb GNU/Linux)

By Abhishek Ghosh May 22, 2015 7:14 am Updated on May 22, 2015

List All Installed Packages on SSH (Ubuntu/deb GNU/Linux)

Advertisement

Here is how to list all installed packages on SSH on deb GNU/Linux including Debian and Ubuntu Servers over SSH. New users frequently need it as they forget what or which tutorial or guide they followed. It is not uncommon to read our one guide for one part, then searching for another thing on Google and following another person’s guide. It can happen that, one package was installed, but that is not needed anymore.

 

List All Installed Packages on SSH (Ubuntu/deb GNU/Linux)

 

Copy paste this command on any text editor first, then copy to SSH and hit the return key :

Vim
1
( zcat $( ls -tr /var/log/apt/history.log*.gz ) ; cat /var/log/apt/history.log ) | egrep '^(Start-Date:|Commandline:)' | grep -v aptdaemon | egrep '^Commandline:'

copy-pasting will evoke the webpage’s URL to get copied to protect contact-theft, that is why; copy on text editor first. We kept another way to to execute the command, here is a gist file of the command as bash script. You will only run these commands :

Advertisement

---

Vim
1
2
3
wget https://gist.github.com/AbhishekGhosh/790c9593048adee4735b/raw/5e2a82abc518a1d552a2d8a7af19bec9bdf99d94/packages.sh
chmod +x packages.sh
sh packages.sh

Against the command, you’ll get this list :

List All Installed Packages on SSH (Ubuntu:deb GNU:Linux)

This has security advantages too – it list the commands you typed to install or update the system. In case, you want the date of the works too, this modified command will work fine :

Vim
1
2
( zcat $( ls -tr /var/log/apt/history.log*.gz ) ; \
cat /var/log/apt/history.log ) | egrep '^(Start-Date:|Commandline:)' | grep -v aptdaemon | egrep -B1 '^Commandline:'

You’ll get list like this :

Vim
1
2
3
4
5
Commandline: apt-get autoremove
Start-Date: 2015-05-22  01:34:32
Commandline: apt-get purge --auto-remove memcached php5-memcache
Start-Date: 2015-05-22  01:39:47
Commandline: apt-get purge --auto-remove monit rmon

We are getting the data from the log files, not apt. It is risk free for a running server. We have a separate gist for it on Github.

 

How I Will Handle the List of All Installed Packages on SSH

 

Suppose, you want to see all the works with xcache, then it is better to use the script :

Vim
1
2
wget https://gist.githubusercontent.com/AbhishekGhosh/45a209e6cb44dd8c9c9d/raw/9ba95b404eebd7d1721c4eb6439cc3767c84f145/packages-date.sh && chmod +x packages-date.sh
sh packages-date.sh | grep xcache

Now, you can replace whatever you are searching for with xcache after grep command to find it. This are the official commands :

Vim
1
2
dpkg --get-selections | grep -v deinstall
aptitude search '~i!~M'

the above are not exactly what people want over SSH. We want our manual work, not the dependencies got installed o system installed. We have not discovered the commands and we do not need to know who discovered the commands. They serve the purpose, that is enough.

Tagged With GNU linux list packages installed , list installed packages GNU/linux , ubuntu list all installed packages , ubuntu list packages installed

This Article Has Been Shared 408 Times!

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to List All Installed Packages on SSH (Ubuntu/deb GNU/Linux)

  • What is Load Average in GNU/Linux?

    If We Run Top Command, We Can See a Parameter Load Average. What is Load Average in GNU/Linux? Why we need to know this load average for a server?

  • Windows Like Linux Distro Zorin OS : Another Linux Distro

    Windows Like Linux distro is most often searched by Power users to switch from Windows OS to Linux OS. Zorin OS is a Powerful Linux distro with Windows look.

  • Commands For Mac : Learning the Command Line Interface

    Commands For Mac are one of the most useful and powerful point as for an Operating system.Not all users are used with UNIX CLI,so here is an easy guide for you.

  • ARM Architecture : The Processor Behind Smartphones and Tablets

    ARM Architecture is currently most widely used Processor architecture for embedded and mobile devices. But they are being in consideration for the servers too.

  • Self Hosted Schema.org and Microformats Free Checking Tools

    Self Hosted Schema.org and Microformats Free Checking Tools can easily be hosted on any free Platform as a Service (PaaS) or cloud server or with your website. We typically in schooling said these type of tools as scripts. Nowadays with the possible more usage of mobile devices, people refer them as Apps. What ever they […]

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Zebronics Pixaplay 16 : Entry Level Movie Projector Review February 2, 2023
  • What is Voice User Interface (VUI) January 31, 2023
  • Proxy Server: Design Pattern in Programming January 30, 2023
  • Cyberpunk Aesthetics: What’s in it Special January 27, 2023
  • How to Do Electrical Layout Plan for Adding Smart Switches January 26, 2023

About This Article

Cite this article as: Abhishek Ghosh, "List All Installed Packages on SSH (Ubuntu/deb GNU/Linux)," in The Customize Windows, May 22, 2015, February 2, 2023, https://thecustomizewindows.com/2015/05/list-all-installed-packages-on-ssh-ubuntudeb-gnulinux/.

Source:The Customize Windows, JiMA.in

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT