From: Mike Viau on

> 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.
>
>
> On Fri, 19 Mar 2010 13:48:54 -0900 <gomadtroll(a)acsalaska.net> wrote:
>
> 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.
>

Yes I agree it would be a very handy feature. What is the debian-user mailing list members thoughts on creating a feature request for such a feature.

> 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.
>

I have noticed that the packages marked as auto are automatically removed when the package that depended on the automatically installed package was removed (such as the recommends packages).

I was unaware of the deborphan package.
+1 for the find and teach out!

>
> --
> 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
>

_________________________________________________________________
Check your Hotmail from your phone.
http://go.microsoft.com/?linkid=9712957
From: Ron Johnson on
>> On Fri, 19 Mar 2010 13:48:54 -0900 <gomadtroll(a)acsalaska.net> wrote:
>>
>> 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.
>>
>
> Yes I agree it would be a very handy feature. What is the debian-user mailing list members thoughts on creating a feature request for such a feature.
>

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.

--
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/4BA42F5D.5020909(a)cox.net
From: Mike Viau on

> 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:~#

>
> --
> 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.03134.mgb-debian(a)yosemite.net
>

_________________________________________________________________
IM on the go with Messenger on your phone
http://go.microsoft.com/?linkid=9712960
From: Greg Madden on
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.

>
> >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
From: Mike Viau on

> Date: Fri, 19 Mar 2010 21:13:49 -0500 <ron.l.johnson(a)cox.net> wrote:
>
> >> On Fri, 19 Mar 2010 13:48:54 -0900 <gomadtroll(a)acsalaska.net> wrote:
> >>
> >> 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.
> >>
> >
> > Yes I agree it would be a very handy feature. What is the debian-user mailing list members thoughts on creating a feature request for such a feature.
> >
>
> 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.
>
> --
> Obsession with "preserving cultural heritage" is a racist impediment
> to moral, physical and intellectual progress.
>
>
> --

Ron,

How would you revert your system to using only the packages mentioned in your snapshot?

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


-M

_________________________________________________________________
IM on the go with Messenger on your phone
http://go.microsoft.com/?linkid=9712960