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

Re: getting rid of debian gnome



On Sun, Sep 21, 2003 at 02:25:56PM -0400, Geordie Birch wrote:
> Cheryl Homiak <chomiak@chartermi.net> [21 Sep 2003 12:09 -0500]:
> > Is there any clean way to get rid of gnome. When I did
> > "apt-get install gnome)
> > it installed a whole bunch of packages.
> > but when I did
> > apt-get remove gnome"
> > it just removed the gnome package.
> 
> 	Have a look at debfoster and deborphan.  debfoster is a pain the
> first time you use it but is still very convenient.
> 
> 	Geordie.
> 
> 

I've found that keeping "snapshots" of my package state lets me roll 
back complicated system state changes.

For instance, this script will list the names of all installed packages:

grep -E "^Package|Status:.+$" /var/lib/dpkg/status | \
  sed "s/Package:/\tPackage:/" | tr \\n \\t | sed "s/\t\t/\n/g" | \
  grep "install ok installed" | \
  sed "s/Package: \(.*\)\tStatus: install ok installed/\1/" | sort

You could run this before and after a "big change" and diff the results.

I won't bother to explain this but this script lets me roll back just 
about any complex set of system state changes (it keeps logs of the 
state and all the old debs in an organized way):

cd /mnt/apt
cd latest; if [[ `ls *%* 2>/dev/null | wc -l` -ne 0 ]]; then for x in 
*%*; do mv $x ${x/[0-9]\\%3a/}; done; fi; cd ..
echo Scanning Packages...
dpkg-scanpackages latest /dev/null > $sub/Packages
grep -Ex "Filename: latest/.+" $sub/Packages | sed "s/Filename: 
latest\/\(.*\)/\1/" > old/L$dt
pushd $sub
rm Packages.gz
gzip Packages
popd
mv latest $dt
mkdir latest
for x in `cat old/L$dt`; do mv $dt/$x latest; done
if [[ `ls $dt | wc -l` -eq 0 ]]; then rm -r $dt;
  else echo $dt `ls $dt | wc -l`; mv $dt old; fi



Reply to: