View Full Version : [ubuntu] [SOLVED] How do I list?
neurostu
July 20th, 2008, 09:26 PM
How do I get a list the packages I have installed recently with apt-get?
scragar
July 20th, 2008, 09:30 PM
apt-cache pkgnames | lesswill list all packages on the system,
you can list deb packages downloaded recently, sorting by date or whatever as required:
ls -t /var/cache/apt/archives/*remove the -t to stop sorting by time and just list all packages.
neurostu
July 20th, 2008, 09:30 PM
Thanks... but i need to know how to sort the packages by the date they were installed, and possibly examine the installation dates...
Dr Small
July 20th, 2008, 09:34 PM
How are the currently sorted ... alphabetically?
This may help, though:
man sort
scragar
July 20th, 2008, 09:35 PM
use:ls -l -t /var/cache/apt/archives/*
if you need a lot of details, you only really need package name and date though.
neurostu
July 20th, 2008, 09:42 PM
Scragar, I appreciate both suggestions but neither one lists the recently installed packages...
For example I know I installed a few packages today but none of them are listed in either of the two options...
Dr. Small, I have experience using sort, thanks though
ibuclaw
July 20th, 2008, 10:17 PM
To further scragar's command, this will show the 10 newest deb files that you downloaded,so they should be the last items you installed.
ls -l -t /var/cache/apt/archives/* | head -n11 | tail -n10 | sed 's/^.*\///g;s/_.*$//g'
Although, you could always just check your bash_history file.
cat ~/.bash_history | grep "apt-get install" | sed 's/^.*-get install //g' | tail -n 10 | tac
Regards
Iain
scragar
July 20th, 2008, 10:30 PM
bash_history only shows things installed from the terminal, so it's not as good a solution as listing files in the cache. The problem is that the cache can be cleared, and it looks like it has in this case. As I said anyway, this is packages downloaded, not installed.
Shame apt doesn't keep logs itself other than programs installed in what appears to be a fairly random order.
NullHead
July 20th, 2008, 10:37 PM
Will this help?:sudo cat /var/log/apt/term.log
zvacet
July 21st, 2008, 02:00 AM
synaptic>file tab>history
neurostu
July 21st, 2008, 10:15 AM
Will this help?:sudo cat /var/log/apt/term.log
Thanks!
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.