3

I'm typically booted to Lubuntu. As I find myself using AskUbuntu more and more, I find myself further and further from the stock installation. I prefer to give complete answers. I do not want to tell people to install applications that are already installed.

Unfortunately, I don't always remember what came installed and what I have since installed. Let's just say, I've meandered pretty far from the stock installed applications.

I've looked, I've searched, I've used a search engine until I thought I'd tried everything. I may be missing a keyword or something.

How do I find out, fairly easily and quickly, which applications were installed by me? I'd much prefer to use the terminal - I can pipe the output to a text file, if needed and ideally.

Any ideas for things to search for?

Edit:

I am getting a bit closer but it's still a bit of a hodgepodge. Using the advice below and then checking differences I can get most of this. What I am now unable to compile is a list of software installed by means of GDebi that has not ever been updated. And, from the look of my /apps folder, that's a fair number of programs. Not everything needs updating and some don't have automated PPA additions included with them.

I'm actually at a bit of a loss - I'm not sure this is possible. Here I was, hoping for some archaic one-liner in bash that I'd never heard of and now I'm looking at having to write something a bit more complex. Any other ideas?

KGIII
  • 3,968
  • 1
    ...related https://askubuntu.com/questions/50077/how-to-get-a-list-of-preinstalled-packages – mikewhatever Oct 31 '15 at 13:23
  • 2
    Also related: How do I list the default installed packages? and /var/log/apt/history.* contains everything you installed, so you've got everything now to answer yourself! – Fabby Oct 31 '15 at 13:32
  • Almost - the only thing missing is stuff not installed via apt and never updated automatically. So, if I installed via GDebi and the application has yet to receive an update then it is not listed. We're getting closer! An example is Opera is listed four days later than I know it was installed and the first listing is an 'update.' – KGIII Oct 31 '15 at 13:39
  • It doesn't quite answer your question and would require you to install another application and/or dedicate hard drive space to this, but I work with testing from time to time, so I almost always have a stock VM or VM snapshot of stock. When writing an answer, I usually refer to that as I walk through the steps and take screenshots. Vagrant could help you with this. – drkokandy Nov 04 '15 at 22:21
  • @drkokandy I have paid for an use VMWare so I might just have to do that - thanks. I'm still trying to figure out if there's some mystical, arcane, bash to throw at it and get results. I've been thinking that I can monitor a few folders (on install) and catch new apps that way. – KGIII Nov 04 '15 at 23:02

1 Answers1

1

I try to give an answer to the question I think you were really interested in.

If I encounter a package on my system, how can I tell if this package was installed by default or if I installed it myself?

apt-cache is a tool to query the apt database about packages installed. The command show lists "all package records" of the given package. There you find immediately after the package name a line beginning with "Priority" (or "Essential", then "Priority" is on line 3), so to find out if a given package is installed by default or not you use

apt-cache show <package>|head -n2

e.g.

apt-cache show plymouth|head -n2
Package: plymouth
Priority: standard

apt-cache show htop|head -n2
Package: htop
Priority: optional

apt-cache show bash|head -n3
Package: bash
Essential: yes
Priority: required

So the value of Priority (required, standard, optional) will tell you if the package will be installed by default or not.

guntbert
  • 13,134