• 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 299 Times!

Facebook Twitter Pinterest
Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Orthopaedic 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

You can subscribe to our Free Once a Day, Regular Newsletter by clicking the subscribe button below.

Click To Subscribe

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 (20K Followers)
  • Twitter (4.9k Followers)
  • Facebook (5.8k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.2k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • What is Domain-Driven Design (DDD)? January 23, 2021
  • Top 10 Anti Hacking Software for Microsoft Windows January 22, 2021
  • What is Software Modernization? January 21, 2021
  • Cloud Computing : Cybersecurity Tips for Small Business Owners January 20, 2021
  • Arduino : Independently Blink Multiple LED January 18, 2021

 

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, January 24, 2021, https://thecustomizewindows.com/2015/05/list-all-installed-packages-on-ssh-ubuntudeb-gnulinux/.

Source:The Customize Windows, JiMA.in

 

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Cookie Policy.

PC users can consult Corrine Chorney for Security.

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

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

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