From: Mike Viau on

Fri, 19 Mar 2010 17:28:20 -0900 <gomadtroll(a)acsalaska.net> wrote:
>
> On Friday 19 March 2010 03:52:44 pm Mike Viau wrote:
> > On Fri, 19 Mar 2010 20:31:44 -0300 <rogluz.news(a)gmail.com> wrote:
> > >Ok the bigger problem you should have is "what is a base system"
> >
> > I agree, what a base system means can be different among users.
>
> I was refering to what Debian calls a 'base' intall and 'standard'. When you
> install Debian (net install) the base system is installed, then a reboot is done
> to install any 'tasksel' (gnome the default or alternate desktops) items. i
> think 'standard' packages are added if you allow aptitude to run after the first
> reboot without selecting any additional tasks. hope this makes sense.
>

How can the packages of base, standard, and so forth be view. Basically how does tasksel or the Debian install know what packages to install based on user selection.

Are you saying the 'standard packages' are install regardless if 'standard system' is selected at setup or not. This occurs after the setup reboots and aptitude is run?

> >
> > >You could run in another box a installation and get a list of the basic
> > > system packages, but what do you want the box for? give us a user case
> > > and we would try to sort this mess out for you.
> >
> > Thanks :)
> >
> > >Definitely purging X is a must -- that will take down about 90% of the
> > > "flavour" packages and none of the essential stuff, could you not start
> > > there ?
> >
> > Absolutely, I think that would be a good place to start
> >
> > >Do you need SQL ? Mail ? Apache ... etc ...
> >
> > Not at the moment. My hopes are to remove all the packages that have been
> > installed as time progressed after the initial installation. I am fine with
> > keeping the later versions that were not present on the installation media
> > I used.
> >
> > >A use case would be great ... or is this a experiment?
> >
> > I suppose I can classify this as an experiment case, whereas I will likely
> > later on try out various (which may include Apache, Samba, whatever really,
> > etc) Debian packages on the system. This time I plan to keep better track
> > of what I have installed so that the packages can be purged easily when I
> > am finished with the application.
> >
> >
> > Rogerio
> >
> > 2010/3/19 Greg Madden <gomadtroll(a)acsalaska.net>
> >
> > On Friday 19 March 2010 01:09:20 pm Mike Viau wrote:
> > > > Date: Fri, 19 Mar 2010 21:31:40 +0100
> > > >
> > > > From: iodine(a)runbox.no
> > > >
> > > > To: debian-user(a)lists.debian.org
> > > >
> > > > Subject: Re: How to reduce a debian system to a base system
> > > >
> > > > Mike Viau wrote:
> > > > > In essence I would like to revert my system back to a freshly
> > > > >
> > > > > installed state, without reinstalling. Ultimatly is this possible?
> > > >
> > > > -snip-
> > > >
> > > > > I was hoping to find a solution for a currently running Debian system
> > > > >
> > > > > rather then to create a bare bone baseline or image...
> > > >
> > > > Wouldn't the easiest way be to backup all important data and
> > > >
> > > > reinstall? That _should_ give the same end result. But if that
> > > >
> > > > isn't a viable option for you, please explain why. Is this perhaps
> > > >
> > > > a remote server that you can't get your hands on, I can see how
> > > >
> > > > that would be a problem.
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > Odd
> > >
> > > I do have physical access to the box, but it does not have an optical
> > > drive
> > >
> > > to make re-installation painless. I temporarily borrowed a USB drive that
> > >
> > > is not with me anymore. The hardware is very recent and last time I tried
> > >
> > > to used the net install disk the e1000e driver I was unable to detect my
> > >
> > > network card and the Debian setup insisted that I was to use Ethernet
> > > over
> > >
> > > Firewire.
> >
> > Would be nice to have a 'snapshot' feature to revert to. I have used
> > aptitude
> >
> > (dselect) to get close to a standard install, base + standard is not that
> > many
> >
> > packages, no X.
> >
> >
> >
> > It is a bit tedious, but it can be done, Search for and purge xorg, gnome
> > stuff.
> >
> > Aptitude remembers packages that have been installed as recommends and will
> > prompt
> >
> > you to offer to remove them. 'deborphan' can help find & remove orphaned
> >
> > libraries.
> >
> >
> >
> >
> >
> > --
> >
> > Peace
> >
> >
> >
> > Greg Madden
> >
> >
> >
> >
> >
> > --
> >
> > To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
> >
> > with a subject of "unsubscribe". Trouble? Contact
> > listmaster(a)lists.debian.org
> >
> > Archive:
> > http://lists.debian.org/201003191448.54996.gomadtroll(a)acsalaska.net
> >
> >
> >
> > -M
> >
> > _________________________________________________________________
> > IM on the go with Messenger on your phone
> > http://go.microsoft.com/?linkid=9712960
>
>
>
> --
> Peace
>
> Greg Madden
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian..org
> Archive: http://lists.debian.org/201003191828.20726.gomadtroll(a)acsalaska.net
>

-M

_________________________________________________________________
Live connected with Messenger on your phone
http://go.microsoft.com/?linkid=9712958
From: Mike Bird on
On Fri March 19 2010 19:14:21 Mike Viau wrote:
> > Date: Fri, 19 Mar 2010 14:48:02 -0700 <mgb-debian(a)yosemite.net> wrote:
> >
> > On Fri March 19 2010 12:55:47 Mike Viau wrote:
> > > I was looking for a way to purge or remove all the packages that were
> > > installed on a Debian system after the initial (bare bone) minimal
> > > system installation. I have searched on Google for "How to reduce a
> > > Debian system to a base system" but it seems like the topic of interest
> > > was to reduce the memory consumption of the installed system, which is
> > > not my consern.
> > >
> > > In essence I would like to revert my system back to a freshly installed
> > > state, without reinstalling. Ultimatly is this possible?
> >
> > Assuming your bare bones --get-selections file is called bbs:
> >
> > dpkg --dry-run --purge $(join -v2 <(awk '{if ($2=="install") print $1}'
> > <bbs | sort) <(dpkg --get-selections | awk '{if ($2=="install") print
> > $1}' | sort))
> >
> > Remove "--dry-run" at your own peril once you're happy with the proposed
> > actions.
> >
> > You may need to run it a couple or three times but that should do it.
> >
> > --Mike Bird
>
> My output with the suggestion above.
>
>
> debian:~# dpkg --dry-run --purge $(join -v2 <(awk '{if ($2=="install")
> print $1}' < debian-5.04-base-selections | sort) < (dpkg --get-selections |
> awk '{if ($2=="install") print $1}' | sort)) bash: command substitution:
> line 1: syntax error near unexpected token `(' bash: command substitution:
> line 1: `join -v2 <(awk '{if ($2=="install") print $1}' <
> debian-5.04-base-selections | sort) < (dpkg --get-selections | awk '{if
> ($2=="install") print $1}' | sort)' dpkg: --purge needs at least one
> package name argument
>
> Type dpkg --help for help about installing and deinstalling packages [*];
> Use `dselect' or `aptitude' for user-friendly package management;
> Type dpkg -Dhelp for a list of dpkg debug flag values;
> Type dpkg --force-help for a list of forcing options;
> Type dpkg-deb --help for help about manipulating *.deb files;
> Type dpkg --license for copyright license and lack of warranty (GNU GPL)
> [*].
>
> Options marked [*] produce a lot of output - pipe it through `less' or
> `more' ! debian:~#

Your command has a superfluous space between "<" and "(". Works for me
when the extra space is removed.

--Mike Bird


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/201003192002.56226.mgb-debian(a)yosemite.net
From: Ron Johnson on
On 2010-03-19 21:26, Mike Viau wrote:
>> Date: Fri, 19 Mar 2010 21:13:49 -0500 <ron.l.johnson(a)cox.net> wrote:
[snip]
>>
>> I see no purpose, when you can do this at any time:
>> COLUMNS=180 dpkg -l | grep ^i | \
>> cut -c4-44 > installed.packages.`date +"%Y%M%d-%H%m"`
>>
>> Since that's obviously a pain to write, put it in an alias.
>>
>>
>> --
>
> Ron,
>
> How would you revert your system to using only the packages mentioned in your snapshot?

I'd take a current snapshot list and diff it with the previous list
to know what to get rid of. Then
apt-get install $(cat packages.to.delete.txt)

I'm sure that can be automated with a shell script.

aptitude might have a log file somewhere which list what you just
installed.

> Your output looks identical to "dpkg--get-selections" without the word install on each line.
>

Yup.

--
Obsession with "preserving cultural heritage" is a racist impediment
to moral, physical and intellectual progress.


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/4BA43B9A.3060905(a)cox.net
From: Mike Viau on

Fri, 19 Mar 2010 20:02:56 -0700 <mgb-debian(a)yosemite.net> wrote:
>
> On Fri March 19 2010 19:14:21 Mike Viau wrote:
> > > Date: Fri, 19 Mar 2010 14:48:02 -0700 <mgb-debian(a)yosemite.net> wrote:
> > >
> > > On Fri March 19 2010 12:55:47 Mike Viau wrote:
> > > > I was looking for a way to purge or remove all the packages that were
> > > > installed on a Debian system after the initial (bare bone) minimal
> > > > system installation. I have searched on Google for "How to reduce a
> > > > Debian system to a base system" but it seems like the topic of interest
> > > > was to reduce the memory consumption of the installed system, which is
> > > > not my consern.
> > > >
> > > > In essence I would like to revert my system back to a freshly installed
> > > > state, without reinstalling. Ultimatly is this possible?
> > >
> > > Assuming your bare bones --get-selections file is called bbs:
> > >
> > > dpkg --dry-run --purge $(join -v2 <(awk '{if ($2=="install") print $1}'
> > > <bbs | sort) <(dpkg --get-selections | awk '{if ($2=="install") print
> > > $1}' | sort))
> > >
> > > Remove "--dry-run" at your own peril once you're happy with the proposed
> > > actions.
> > >
> > > You may need to run it a couple or three times but that should do it.
> > >
> > > --Mike Bird
> >
> > My output with the suggestion above.
> >
> >
> > debian:~# dpkg --dry-run --purge $(join -v2 <(awk '{if ($2=="install")
> > print $1}' < debian-5.04-base-selections | sort) < (dpkg --get-selections |
> > awk '{if ($2=="install") print $1}' | sort)) bash: command substitution:
> > line 1: syntax error near unexpected token `(' bash: command substitution:
> > line 1: `join -v2 <(awk '{if ($2=="install") print $1}' <
> > debian-5.04-base-selections | sort) < (dpkg --get-selections | awk '{if
> > ($2=="install") print $1}' | sort)' dpkg: --purge needs at least one
> > package name argument
> >
> > Type dpkg --help for help about installing and deinstalling packages [*];
> > Use `dselect' or `aptitude' for user-friendly package management;
> > Type dpkg -Dhelp for a list of dpkg debug flag values;
> > Type dpkg --force-help for a list of forcing options;
> > Type dpkg-deb --help for help about manipulating *.deb files;
> > Type dpkg --license for copyright license and lack of warranty (GNU GPL)
> > [*].
> >
> > Options marked [*] produce a lot of output - pipe it through `less' or
> > `more' ! debian:~#
>
> Your command has a superfluous space between "<" and "(". Works for me
> when the extra space is removed.
>
> --Mike Bird
>
>
> --

You are correct!

Thanks.


-M

_________________________________________________________________
Live connected with Messenger on your phone
http://go.microsoft.com/?linkid=9712958
From: Mike Viau on

Fri, 19 Mar 2010 22:06:02 -0500 <ron.l.johnson(a)cox.net> wrote:
> On 2010-03-19 21:26, Mike Viau wrote:
> >> Date: Fri, 19 Mar 2010 21:13:49 -0500 <ron.l.johnson(a)cox.net> wrote:
> [snip]
> >>
> >> I see no purpose, when you can do this at any time:
> >> COLUMNS=180 dpkg -l | grep ^i | \
> >> cut -c4-44 > installed.packages.`date +"%Y%M%d-%H%m"`
> >>
> >> Since that's obviously a pain to write, put it in an alias.
> >>
> >>
> >> --
> >
> > Ron,
> >
> > How would you revert your system to using only the packages mentioned in your snapshot?
>
> I'd take a current snapshot list and diff it with the previous list
> to know what to get rid of. Then
> apt-get install $(cat packages.to.delete.txt)
>
> I'm sure that can be automated with a shell script.
>
> aptitude might have a log file somewhere which list what you just
> installed.

Aptitude does log the packages that it installs at /var/log/aptitude. Text manipulation appears like it will have be more complex here as compared to messing with dpkg outputs. Additionally installation performed by apt-get do not appear in the aptitude log file.

>
> > Your output looks identical to "dpkg--get-selections" without the word install on each line.
> >
>
> Yup.
>
> --
> Obsession with "preserving cultural heritage" is a racist impediment
> to moral, physical and intellectual progress.
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian..org
> Archive: http://lists.debian.org/4BA43B9A.3060905(a)cox.net
>

_________________________________________________________________
Check your Hotmail from your phone.
http://go.microsoft.com/?linkid=9712957