SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2009-04-16 16:59:22

fhsm
#! Junkie
From: New Hampshire, USA
Registered: 2009-01-05
Posts: 445

Show Installed apps?

Can someone suggest a way of showing the applications I've actually installed, not things that came with the base or dependencies? 

dpkg --get-selections

  Will show everything currently installed.  What I want is something that will really just tell me what XXXX was every time I've typed

 sudo apt-get install XXXX 

I think /var/log/dpkg.log has that information it but not quite enough resolution to show just the originally requested app.   

cat /var/log/dpkg.log | grep 'install '

Gets me close, but it shows everything installed as the result of an install (dependencies included) and it doesn't look back into the logs that have been rotated out (obviously). 

Can someone a) suggest an easier way of accomplishing all this?
Or failing that b) suggest some command line magic to saving looking at every rotated log one by one?

Offline

Help fund CrunchBang, donate to the project!

#2 2009-04-27 09:10:43

muebelacker
New Member
Registered: 2009-04-27
Posts: 5

Re: Show Installed apps?

Hello,

the easiest way is to look into your bash history /home/user/.bash_history

By default the bash shell saves the last 500 commands. If you add the following line to your .bashrc file in /home/user/.bashrc  you will aks the bash to append the inputs at the end of the history.

shopt -s histappend

br
Mathias

Offline

#3 2009-06-04 23:51:08

fhsm
#! Junkie
From: New Hampshire, USA
Registered: 2009-01-05
Posts: 445

Re: Show Installed apps?

I never really found something that solved this problem well, but the closest I came was:

function apt-history(){
    case "$1" in
        install)
              cat ~/backup/dpkglog.log | grep 'install '
              ;;
        upgrade|remove)
              cat ~/backup/dpkg.log | grep $1
              ;;
        rollback)
              cat ~/backup/dpkg.log | grep upgrade | \
                  grep "$2" -A10000000 | \
                  grep "$3" -B10000000 | \
                  awk '{print $4"="$5}'
              ;;
        *)
              cat ~/backup/dpkg.log
              ;;
      esac
}

(Not my own but I can't seem to find the source, if someone finds it please post it.)

If anyone happens to turn up a better solution le'me know.

=====Update=====
I may have found a better solution moving forward: http://crunchbanglinux.org/forums/post/24282/#p24282

=====Update=====
Fixed bad link

Last edited by fhsm (2009-10-12 22:24:38)

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo