Le 25/02/2015 19:36, John R Pierce a ?crit :> I install from the 'minimum' ISO, and get that off the bat, then just > install the packages I need with yumI do the same, but my question is: how to do that the other way around? Let's say you start from the base system, then install a couple dozen command-line utilities from cowsay to whois, then you install the "X Window System" group, a couple dozen fonts, then the WindowMaker window manager, then a handful of X applications... how do you manage from there to get back to exactly the base system you had from the start? I know this may sound a little academic, but it's for a little private experiment here. Niki -- Microlinux - Solutions informatiques 100% Linux et logiciels libres 7, place de l'?glise - 30730 Montpezat Web : http://www.microlinux.fr Mail : info at microlinux.fr T?l. : 04 66 63 10 32
On Wed, Feb 25, 2015 at 2:04 PM, Niki Kovacs <info at microlinux.fr> wrote:> > Le 25/02/2015 19:36, John R Pierce a ?crit : > >> I install from the 'minimum' ISO, and get that off the bat, then just >> install the packages I need with yum >> > > I do the same, but my question is: how to do that the other way around? > Let's say you start from the base system, then install a couple dozen > command-line utilities from cowsay to whois, then you install the "X Window > System" group, a couple dozen fonts, then the WindowMaker window manager, > then a handful of X applications... how do you manage from there to get > back to exactly the base system you had from the start? I know this may > sound a little academic, but it's for a little private experiment here. > > Niki >It's not automatic so maybe not what you're looking for, but reviewing the yum log in /var/log/ will give you a chronological list of what packages were installed, so you could use that create a list of packages to remove. Be careful about updates that masquerade as installations, like kernel packages. You could also query by install date as outlined here: http://unix.stackexchange.com/questions/2291/centos-list-the-installed-rpms-by-date-of-installation-update I don't think there's a single yum command that lets you roll back to the packages the were installed at a given point in time. I also don't think that this would get you back to the *exact* system as it was. Linux packages aren't completely self contained like that, and have the potential to make other changes to the system, so it's not a completely clean rollback. At minimum, you'd have rpmsave files laying around, probably empty directories, etc... ? Brian Mathis @orev
On Wed, 25 Feb 2015 20:04:22 +0100 Niki Kovacs wrote:> how do you manage from > there to get back to exactly the base system you had from the start?My approach would be to create a list of installed rpms for what you're using as the base system: rpm -qa --qf "%{NAME}\n" | sort > starting.txt Run that command again when you have all of the extra stuff installed, using a different filename for the output, for example, ending.txt Now merge and compare those files, and pull out the unique entries: sort starting.txt ending.txt | uniq -u > newstuff.txt Now remove the files in newstuff.txt yum remove `cat newstuff.txt` There is probably a way to combine those last two steps into one single command. -- MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com
On 2/25/2015 12:04 PM, Niki Kovacs wrote:> > Le 25/02/2015 19:36, John R Pierce a ?crit : >> I install from the 'minimum' ISO, and get that off the bat, then just >> install the packages I need with yum > > I do the same, but my question is: how to do that the other way around? > Let's say you start from the base system, then install a couple dozen > command-line utilities from cowsay to whois, then you install the "X > Window System" group, a couple dozen fonts, then the WindowMaker window > manager, then a handful of X applications... how do you manage from > there to get back to exactly the base system you had from the start? I > know this may sound a little academic, but it's for a little private > experiment here.Before I discovered the minimal iso I found that I could unselect everything and still get a working install with CentOS on my servers. Curiously, that didn't work with RedHat, had to at least select the "base" option and then go thru the base options to deselect bits. My experience is only up thru v6, don't know about v7 (refuse to use it for now). -- Steve
Le 25/02/2015 20:18, Brian Mathis a ?crit :> I don't think there's a single yum command that lets you roll back to the > packages the were installed at a given point in time.Maybe a good idea would be to find one or a handful of packages that the whole desktop and/or graphical subsystem depends on. Removing this one package - or this handful of packages, but which? - would already result in removing everything X11-related. After that, I can always manually sort out the remaining command-line stuff. Niki -- Microlinux - Solutions informatiques 100% Linux et logiciels libres 7, place de l'?glise - 30730 Montpezat Web : http://www.microlinux.fr Mail : info at microlinux.fr T?l. : 04 66 63 10 32