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

Re: How to track what packages apt-get installs and removes?



Sonixxfx(sonixxfx@gmail.com) is reported to have said:
> Hi,
> 
> Can someone tell me how I can track what packages apt-get installs and
> removes? I occasianally run apt-get dist-upgrade from cron and I would like
> to know what has been installed and removed by apt-get afterwards.
> 
> Thanks for your help.
> 
> Regards,
> 
> Ben

I use this

________________________________________________________

#!/bin/sh

# Written by Larry Holish, ljholish@speakeasy.net


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

LISTDIR= (Directory you want the history saved to)
cd $LISTDIR

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

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

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

diff -C 0 pkgs_etch.last pkgs_etch.current >> etch_history.txt

gzip etch_history.txt
rm -f pkgs_etch.last

echo "Updating Package list at (Directory you want the history saved to)
 
_______________________________________________________

Run it after each update/upgrade

Wayne



Reply to: