-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bob wrote: > 8< Snip original thread, to see it in all it's glory go here > http://groups.google.com/group/linux.debian.user/browse_frm/thread/d273b566e1a761d5/3bb0f539cdd82281? > > > Thought I'd update the list on my progress on this, > *WARNING THIS WILL BRAKE YOUR INSTALL* but the reasons are interesting > > # make a list of installed packages by date > ls -l -t /var/lib/dpkg/info/*.list > ./inst.txt > vi ./inst.txt > # delete what you want to keep > > # beautify the list (thanks Joe and Tyler) > cat ./inst.txt | sed 's/.*\(200[0-9]\)/\1/g' | awk -F"/" '{print $6}' | > awk -F"." '{print $1}' > uninstall.txt > apt-get -s remove --purge $(cat ./uninstall.txt) > > # At this point you'll get errors like "E: Couldn't find package libldap-2" > # so in another terminal open ./uninstall.txt and delete the offending > entrys > # (there'll be many) until the command runs cleanly, then > # it will most likely have a section like > > WARNING: The following essential packages will be removed. > This should NOT be done unless you know exactly what you are doing! > apt libc6 (due to apt) libgcc1 (due to apt) libstdc++6 (due to apt) > debian-archive-keyring (due to apt) base-files base-passwd (due to > base-files) bash debianutils (due to bash) libncurses5 (due to bash) > bsdutils coreutils libacl1 (due to coreutils) libselinux1 (due to > coreutils) mktemp (due to debianutils) diff dpkg e2fsprogs e2fslibs (due > to e2fsprogs) libblkid1 (due to e2fsprogs) libcomerr2 (due to > e2fsprogs) libss2 (due to e2fsprogs) libuuid1 (due to e2fsprogs) > findutils grep gzip hostname login libpam-modules (due to login) > libpam0g (due to login) mount ncurses-base ncurses-bin perl-base sed > sysvinit > libsepol1 (due to sysvinit) initscripts (due to sysvinit) > sysvinit-utils (due to sysvinit) tar util-linux lsb-base (due to > util-linux) tzdata (due to util-linux) libslang2 (due to util-linux) > zlib1g (due to > util-linux) > > # you should remove any listed packages from the uninstall.txt list > until it all runs without a warning, > # you may have to go to the packages webpage to figure out dependencies. > http://www.debian.org/distrib/packages > # for instance on my system libldap2 gnupg gpgv were causing apt to get > listed > # you should also have a look at the page for your running kernel and > make sure you're > # not uninstalling any of it's dependencies. > > # after that you can run apt-get without the -s > > > The process went fine but I uninstalled networking so gave up and > reinstalled, the problem is when a package gets updated it causes it to > appear on a different date that that on-which it was initially installed > so you can easily remove something you want to keep. > > If I had been a little more cautious or if I was removing less from the > system it would have gone fine, all I need is a way of listing packages > by when they were *first* installed. > > Hay ho, it's no substitute for aptitude but it was an interesting > experiment. > > I would agree. End result is a broken system. Much better just to use aptitude and mark packages individually. My addition to the script was only as a learning exercise and Tyler fixed it to do exactly what was wanted. I never would dream of running that.
What I don't get is why someone would even do something like that in the first place. If one is worried about bloat, then install a base system and add only packages that are needed. Joe - -- Registerd Linux user #443289 at http://counter.li.org/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGCLxxiXBCVWpc5J4RAlpXAJ9nvnyeLH3KPGR+4t0fTIPiyea+RwCfWYvD pl62JhAcs2lQc/mZDbrWB80= =BCnz -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]