You are not logged in.
Pages: 1
Can someone suggest a way of showing the applications I've actually installed, not things that came with the base or dependencies?
dpkg --get-selectionsWill 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?
FHSM: avoid vowels and exotic consonants and you'll get your handle every time. identi.ca
Offline
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
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)
FHSM: avoid vowels and exotic consonants and you'll get your handle every time. identi.ca
Offline
Pages: 1
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.