[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is there an apt-get install log?



On Tue, 06 Aug 2002 14:27:23 -0500, Ron Johnson wrote:

>On Tue, 2002-08-06 at 14:14, Shri Shrikumar wrote:
>> On Tue, 2002-08-06 at 17:54, rich wrote:
>> > 
>> > All,
>> > 
>> > Is there a log anywhere that has a list of packages installed and
>> > their install dates?
>> > If not, what is a good way to completely back out of a package and
>> > all the installed dependencies?
>> 
>> To get a list of installed packages, you could just do
>[snip]
>> The above doesn't catch more than one level of dependency though.
>> 
>> I just hacked the above scripts together and do *not* consider myself an
>> export on these matters please so use at your own risk.
>
>But he's also asking for the install date.  Me, as soon as I
>complete a set of installs/removes, I do a:
>COLUMNS=120 dpkg -l > /root/dpkg/dpkg.installed.`date +%y%m%d.%H%M`
>
>Then, I can diff to see what was installed when.  Crude yet effective.
>
Here's a little script I run after each install, upgrade, or removal.
It creates a log of each change to my software (not including locally
installed/compiled stuff).

===============================================================

# Written by Larry Holish, ljholish@speakeasy.net


# Script that writes current list of packages installed
# from /var/lib/dpkg/available to pkgs_woody.current.
# Keeps a history of changes between package versions
# in woody_history.txt.

LISTDIR=/home/gt/debian
cd $LISTDIR

if [ -f 'woody_history.txt.gz' ]; then
	gunzip woody_history.txt.gz
fi

if [ -f 'pkgs_woody.current' ]; then
	mv pkgs_woody.current pkgs_woody.last
fi

COLUMNS=120 dpkg -l | grep "^i" | cut -b 5- > pkgs_woody.current

diff -C 0 pkgs_woody.last pkgs_woody.current >> woody_history.txt

gzip woody_history.txt
rm -f pkgs_woody.last

# EOF

===========================================================
--
gt       kk5st@swbell.net
It ain't so much what you don't know that gets you in trouble---
it's what you do know that ain't so.--unk



Reply to: