public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Gentoo Machine Cleanup
@ 2007-07-16 23:18 Samir Faci
  2007-07-16 23:29 ` Mark Knecht
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Samir Faci @ 2007-07-16 23:18 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 842 bytes --]

Hi all,

   So, I have a gentoo install that's slowly evolved over the past 3 years
or so years.  It's now so cluttered with packages, it's becoming ridiculous,
especially for a headless server.  What I'd like to do is be able to remove
all KDE/Gnome/X/gtk/qt/...etc out of the machine and not have it break the
machine completely.

Any suggestion on how to do go about this?  At this stage, I'd like the
server to have  the basic system build, LAMP, and Postfix.

If I start removing packages, then revdep complains about dependencies and
ends pulling back the packages I had removed, same thing with world.  I
globally removed all the X related flags I can think of.

Also, in the process of switching to a hardened profile, which is one reason
why I wanted to clean up the install.

Thanks again,

Any help would be appreciated.

--
Samir

[-- Attachment #2: Type: text/html, Size: 956 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Gentoo Machine Cleanup
  2007-07-16 23:18 [gentoo-user] Gentoo Machine Cleanup Samir Faci
@ 2007-07-16 23:29 ` Mark Knecht
  2007-07-16 23:45   ` Albert Hopkins
  2007-07-17  6:27   ` Abraham Marín Pérez
  2007-07-17  0:31 ` Neil Bothwick
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 10+ messages in thread
From: Mark Knecht @ 2007-07-16 23:29 UTC (permalink / raw
  To: gentoo-user

On 7/16/07, Samir Faci <samir.list@gmail.com> wrote:
> Hi all,
>
>    So, I have a gentoo install that's slowly evolved over the past 3 years
> or so years.  It's now so cluttered with packages, it's becoming ridiculous,
> especially for a headless server.  What I'd like to do is be able to remove
> all KDE/Gnome/X/gtk/qt/...etc out of the machine and not have it break the
> machine completely.
>
> Any suggestion on how to do go about this?  At this stage, I'd like the
> server to have  the basic system build, LAMP, and Postfix.
>
> If I start removing packages, then revdep complains about dependencies and
> ends pulling back the packages I had removed, same thing with world.  I
> globally removed all the X related flags I can think of.
>
> Also, in the process of switching to a hardened profile, which is one reason
> why I wanted to clean up the install.
>
> Thanks again,
>
> Any help would be appreciated.
>
> --
> Samir
>

Hi Samir,
   You'll probably get some answers more detailed than mine but
fundamentally it goes something like this:

1) First do and emerge -DuN world and make sure everything is up to date.

2) By hand then emerge -C everything (for instance) with gnome or kde
in the package name.

3) Next do an emerge --depclean and let portage remove packages that
were needed for gnome or kde but not required now

4) Do a revdep-rebuild and see what it wants to pull in. If it's
trying to pull in something you don't think is necessary then do an
emerge -pe --tree and look at why it's getting pulled in. Either
remove what's causing it to get rebuilt or let it get pulled back in.

   At this point it's lather and repeat if necessary.

   I've done this a couple of times. It' works but be careful that you
don't reboot during the process as something might be gone that's
still necessary.

Hope this helps,
Mark
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Gentoo Machine Cleanup
  2007-07-16 23:29 ` Mark Knecht
@ 2007-07-16 23:45   ` Albert Hopkins
  2007-07-17  6:27   ` Abraham Marín Pérez
  1 sibling, 0 replies; 10+ messages in thread
From: Albert Hopkins @ 2007-07-16 23:45 UTC (permalink / raw
  To: gentoo-user

I've done similar to Mark, but slightly different.

# # back up your system
# emerge -DuvaN world # make sure u're up-to-date
# vi /etc/make.conf ; vi /etc/portage/package.use # edit your USE flags
# emerge -DuvaN # update to new USE flags
# cp -a /var/lib/portage/world ~/ # backup world file
# vi /var/lib/portage/world # remove whatever u don't want
# emerge -va --depclean # make sure you don't remove anything critical
# emerge -DuvaN world # ideally, u should get nothing
# revdep-rebuild -i # fix broken linkages

Last two may need to be repeating, as you may find you need to tune your
USE flags.

Depending on your requirements, it may save time just to re-install.

--
Albert W. Hopkins

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Gentoo Machine Cleanup
  2007-07-16 23:18 [gentoo-user] Gentoo Machine Cleanup Samir Faci
  2007-07-16 23:29 ` Mark Knecht
@ 2007-07-17  0:31 ` Neil Bothwick
  2007-07-17  4:40 ` Canek Peláez
  2007-07-17 16:43 ` Dirk Heinrichs
  3 siblings, 0 replies; 10+ messages in thread
From: Neil Bothwick @ 2007-07-17  0:31 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1685 bytes --]

On Mon, 16 Jul 2007 18:18:44 -0500, Samir Faci wrote:

>    So, I have a gentoo install that's slowly evolved over the past 3
> years or so years.  It's now so cluttered with packages, it's becoming
> ridiculous, especially for a headless server.  What I'd like to do is
> be able to remove all KDE/Gnome/X/gtk/qt/...etc out of the machine and
> not have it break the machine completely.

After removing the USE flags, you need to run "emerge -uavDN world" to
ensure that everything is built without the optional X support. Then run
emerge --depclean -p. you could also edit your world file and remove any
packages in there that you no longer need, or that are only installed as
dependencies of other packages (these shouldn't be there in the first
place, but it's easy to forget to use --oneshot at some time).

> If I start removing packages, then revdep complains about dependencies
> and ends pulling back the packages I had removed, same thing with
> world.  I globally removed all the X related flags I can think of.

Start removing packages? If you only take pout some of what --depclean
wants to remove, then revdep-rebuild is likely to want to reinstate some,
because other packages still installed, but on the depclean list, need
them. Unlike emerge, revdep-rebuild does not consider your world file or
USE flags, but looks at the installed files and what they need, so you
must complete depclean before running revdep-rebuild.

Check the output of merge --depclean -p before removing anything, don't
remove anything that looks critical without checking first.


-- 
Neil Bothwick

The box said 'needs Win95 or better' so I bought an Amiga.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Gentoo Machine Cleanup
  2007-07-16 23:18 [gentoo-user] Gentoo Machine Cleanup Samir Faci
  2007-07-16 23:29 ` Mark Knecht
  2007-07-17  0:31 ` Neil Bothwick
@ 2007-07-17  4:40 ` Canek Peláez
  2007-07-17 16:43 ` Dirk Heinrichs
  3 siblings, 0 replies; 10+ messages in thread
From: Canek Peláez @ 2007-07-17  4:40 UTC (permalink / raw
  To: gentoo-user

On 7/16/07, Samir Faci <samir.list@gmail.com> wrote:
> Hi all,
>
>    So, I have a gentoo install that's slowly evolved over the past 3 years
> or so years.  It's now so cluttered with packages, it's becoming ridiculous,
> especially for a headless server.  What I'd like to do is be able to remove
> all KDE/Gnome/X/gtk/qt/...etc out of the machine and not have it break the
> machine completely.
>
> Any suggestion on how to do go about this?  At this stage, I'd like the
> server to have  the basic system build, LAMP, and Postfix.

The easiest thing is to remove xorg entirely: uninstall
xorg-base/xorg-x11 and mask the package in /etc/portage/package.mask.
Also, add "-X -gtk -qt3 -qt4" to your USE flags. Then try an emerge
-uDNvp world; it would tell you what packages could not be resolved
because they need X.org.

It would be long and don't think it can be automated. When I
eliminated KDE (why did I have to install it in the first place?), it
took at least five emerges to get it done. You can advance by
equery'ing all the packages with kde, gnome, and x11 categories or
names, get the list and remove all of them.

Good luck: but it's going to take a little effort.
-- 
Canek Peláez Valdés
Facultad de Ciencias, UNAM
--
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Gentoo Machine Cleanup
  2007-07-16 23:29 ` Mark Knecht
  2007-07-16 23:45   ` Albert Hopkins
@ 2007-07-17  6:27   ` Abraham Marín Pérez
  2007-07-17 15:51     ` Samir Faci
  1 sibling, 1 reply; 10+ messages in thread
From: Abraham Marín Pérez @ 2007-07-17  6:27 UTC (permalink / raw
  To: gentoo-user

Mark Knecht escribió:
> On 7/16/07, Samir Faci <samir.list@gmail.com> wrote:
>> Hi all,
>>
>>    So, I have a gentoo install that's slowly evolved over the past 3 
>> years
>> or so years.  It's now so cluttered with packages, it's becoming 
>> ridiculous,
>> especially for a headless server.  What I'd like to do is be able to 
>> remove
>> all KDE/Gnome/X/gtk/qt/...etc out of the machine and not have it 
>> break the
>> machine completely.
>>
>> Any suggestion on how to do go about this?  At this stage, I'd like the
>> server to have  the basic system build, LAMP, and Postfix.
>>
>> If I start removing packages, then revdep complains about 
>> dependencies and
>> ends pulling back the packages I had removed, same thing with world.  I
>> globally removed all the X related flags I can think of.
>>
>> Also, in the process of switching to a hardened profile, which is one 
>> reason
>> why I wanted to clean up the install.
>>
>> Thanks again,
>>
>> Any help would be appreciated.
>>
>> -- 
>> Samir
>>
>
> Hi Samir,
>   You'll probably get some answers more detailed than mine but
> fundamentally it goes something like this:
>
> 1) First do and emerge -DuN world and make sure everything is up to date.
>
> 2) By hand then emerge -C everything (for instance) with gnome or kde
> in the package name.
>
> 3) Next do an emerge --depclean and let portage remove packages that
> were needed for gnome or kde but not required now
>
> 4) Do a revdep-rebuild and see what it wants to pull in. If it's
> trying to pull in something you don't think is necessary then do an
> emerge -pe --tree and look at why it's getting pulled in. Either
> remove what's causing it to get rebuilt or let it get pulled back in.
>
>   At this point it's lather and repeat if necessary.
>
>   I've done this a couple of times. It' works but be careful that you
> don't reboot during the process as something might be gone that's
> still necessary.
>
> Hope this helps,
> Mark
I'd proceed similar to this, but changing order:

1) Edit /var/lib/portage/world and unlist every unwanted package.

2) Edit /etc/make.conf and explicitly unset every use tag related to 
packages you don't want in your system.

3) run emerge --update --deep --newuse --ask world

4) run emerge --depclean --ask

5) run revdep-rebuild

If you update your system before removing unwanted packages from world 
file you'll waste time updating packages that will be uninstalled 
afterwards (and big packages, must be said). This way you'll update only 
what you'll keep.

Needless to say, it's always a good idea to back-up your system before 
proceeding.

HTH,
Abraham

-- 
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Gentoo Machine Cleanup
  2007-07-17  6:27   ` Abraham Marín Pérez
@ 2007-07-17 15:51     ` Samir Faci
  2007-07-17 16:03       ` Neil Bothwick
  2007-07-17 16:27       ` Alan McKinnon
  0 siblings, 2 replies; 10+ messages in thread
From: Samir Faci @ 2007-07-17 15:51 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 4095 bytes --]

I'm actually trying a slightly different approach that's almost equivalent
to doing a fresh install.

If I don't bork this up, I'll write a lil wiki on how to do this.

1.  create a loopback file system.   dd if=/dev/zero of=baseimage bs=1k
count=5242880  (5 gig image)
2.  partition the baseimage
3.  do your typical gentoo install on the baseimage file
4.  sync data from baseimage fs, to / omitting /dev /proc /sys /home making
sure this is all backed up
5.  rerun grub to make sure everything is proper
6.  reboot and pray.

so, if I'm right, that should give me a clean fresh install.  I'll take a
backup of my /etc directory and I need to remember to backup mysql db, but I
believe that should work fine.  I would do this off a liveCD if I had
physical access to the machine.

It seems like the cleanest solution.  if I run emerge -uDN (etc) world it
just keeps pulling X and other crap I removed, and since 80% of what's on
the machine it unneeded, a fresh start wouldn't hurt.

if anyone is interested, I'll post an update on how my install went once
it's back up.

--
Samir


On 7/17/07, Abraham Marín Pérez <tecnic5@silvanoc.com> wrote:
>
> Mark Knecht escribió:
> > On 7/16/07, Samir Faci <samir.list@gmail.com> wrote:
> >> Hi all,
> >>
> >>    So, I have a gentoo install that's slowly evolved over the past 3
> >> years
> >> or so years.  It's now so cluttered with packages, it's becoming
> >> ridiculous,
> >> especially for a headless server.  What I'd like to do is be able to
> >> remove
> >> all KDE/Gnome/X/gtk/qt/...etc out of the machine and not have it
> >> break the
> >> machine completely.
> >>
> >> Any suggestion on how to do go about this?  At this stage, I'd like the
> >> server to have  the basic system build, LAMP, and Postfix.
> >>
> >> If I start removing packages, then revdep complains about
> >> dependencies and
> >> ends pulling back the packages I had removed, same thing with world.  I
> >> globally removed all the X related flags I can think of.
> >>
> >> Also, in the process of switching to a hardened profile, which is one
> >> reason
> >> why I wanted to clean up the install.
> >>
> >> Thanks again,
> >>
> >> Any help would be appreciated.
> >>
> >> --
> >> Samir
> >>
> >
> > Hi Samir,
> >   You'll probably get some answers more detailed than mine but
> > fundamentally it goes something like this:
> >
> > 1) First do and emerge -DuN world and make sure everything is up to
> date.
> >
> > 2) By hand then emerge -C everything (for instance) with gnome or kde
> > in the package name.
> >
> > 3) Next do an emerge --depclean and let portage remove packages that
> > were needed for gnome or kde but not required now
> >
> > 4) Do a revdep-rebuild and see what it wants to pull in. If it's
> > trying to pull in something you don't think is necessary then do an
> > emerge -pe --tree and look at why it's getting pulled in. Either
> > remove what's causing it to get rebuilt or let it get pulled back in.
> >
> >   At this point it's lather and repeat if necessary.
> >
> >   I've done this a couple of times. It' works but be careful that you
> > don't reboot during the process as something might be gone that's
> > still necessary.
> >
> > Hope this helps,
> > Mark
> I'd proceed similar to this, but changing order:
>
> 1) Edit /var/lib/portage/world and unlist every unwanted package.
>
> 2) Edit /etc/make.conf and explicitly unset every use tag related to
> packages you don't want in your system.
>
> 3) run emerge --update --deep --newuse --ask world
>
> 4) run emerge --depclean --ask
>
> 5) run revdep-rebuild
>
> If you update your system before removing unwanted packages from world
> file you'll waste time updating packages that will be uninstalled
> afterwards (and big packages, must be said). This way you'll update only
> what you'll keep.
>
> Needless to say, it's always a good idea to back-up your system before
> proceeding.
>
> HTH,
> Abraham
>
> --
> --
> gentoo-user@gentoo.org mailing list
>
>

[-- Attachment #2: Type: text/html, Size: 5080 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Gentoo Machine Cleanup
  2007-07-17 15:51     ` Samir Faci
@ 2007-07-17 16:03       ` Neil Bothwick
  2007-07-17 16:27       ` Alan McKinnon
  1 sibling, 0 replies; 10+ messages in thread
From: Neil Bothwick @ 2007-07-17 16:03 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 683 bytes --]

On Tue, 17 Jul 2007 10:51:06 -0500, Samir Faci wrote:

> It seems like the cleanest solution.  if I run emerge -uDN (etc) world
> it just keeps pulling X and other crap I removed, and since 80% of
> what's on the machine it unneeded, a fresh start wouldn't hurt.

Add --tree --verbose to the emerge command and see what's pulling X back
in. It is probable that either you have overlooked a USE flag or that
your have something in your world file that requires X.


-- 
Neil Bothwick

Ninety-Ninety Rule Of Project Schedules - The first ninety percent of
the task takes ninety percent of the time, and the last ten percent
takes the other ninety percent of the time.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Gentoo Machine Cleanup
  2007-07-17 15:51     ` Samir Faci
  2007-07-17 16:03       ` Neil Bothwick
@ 2007-07-17 16:27       ` Alan McKinnon
  1 sibling, 0 replies; 10+ messages in thread
From: Alan McKinnon @ 2007-07-17 16:27 UTC (permalink / raw
  To: gentoo-user

On Tuesday 17 July 2007, Samir Faci wrote:
> I'm actually trying a slightly different approach that's almost
> equivalent to doing a fresh install.
>
> If I don't bork this up, I'll write a lil wiki on how to do this.
>
> 1.  create a loopback file system.   dd if=/dev/zero of=baseimage
> bs=1k count=5242880  (5 gig image)
> 2.  partition the baseimage
> 3.  do your typical gentoo install on the baseimage file
> 4.  sync data from baseimage fs, to / omitting /dev /proc /sys /home
> making sure this is all backed up
> 5.  rerun grub to make sure everything is proper
> 6.  reboot and pray.
>
> so, if I'm right, that should give me a clean fresh install.  I'll
> take a backup of my /etc directory and I need to remember to backup
> mysql db, but I believe that should work fine.  I would do this off a
> liveCD if I had physical access to the machine.
>
> It seems like the cleanest solution.  if I run emerge -uDN (etc)
> world it just keeps pulling X and other crap I removed, and since 80%
> of what's on the machine it unneeded, a fresh start wouldn't hurt.
>
> if anyone is interested, I'll post an update on how my install went
> once it's back up.

It seems to me that you are overlooking some stuff, and what you propose 
is just way too complex.

Packages get pulled in through your world file, USE flags and due to 
run-time and build time deps. If emerge keeps wanting to pull in 
something X related, it's because you left someting in one of those 
three categories that is X-related. Simply find it and handle it. I 
have several times removed gnome and kde from this machine and it was 
much faster than a reinstall.

'emerge -pe' and 'equery depgraph' are your friends

alan

-- 
Optimists say the glass is half full,
Pessimists say the glass is half empty,
Developers say wtf is the glass twice as big as it needs to be?

Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-user] Gentoo Machine Cleanup
  2007-07-16 23:18 [gentoo-user] Gentoo Machine Cleanup Samir Faci
                   ` (2 preceding siblings ...)
  2007-07-17  4:40 ` Canek Peláez
@ 2007-07-17 16:43 ` Dirk Heinrichs
  3 siblings, 0 replies; 10+ messages in thread
From: Dirk Heinrichs @ 2007-07-17 16:43 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 893 bytes --]

Am Dienstag, 17. Juli 2007 schrieb Samir Faci:

>    So, I have a gentoo install that's slowly evolved over the past 3 years
> or so years.  It's now so cluttered with packages, it's becoming
> ridiculous, especially for a headless server.  What I'd like to do is be
> able to remove all KDE/Gnome/X/gtk/qt/...etc out of the machine and not
> have it break the machine completely.

You've already recieved some answers how to do it with portage. Here's how you 
can do it with paludis:

1) revise your use flags (remove X, kde, ...)
2) export PALUDIS_OPTIONS="--dl-reinstall if-use-changed"
3) update world: paludis -i world
4) remove unneeded packages: paludis --uninstall-unused
5) remove all packages you don't want anymore:
   paludis --uninstall --with-unused-dependencies <pkg> ...
6) revdep-rebuild (make sure you have the paludis-enabled version).

HTH...

	Dirk

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-07-17 16:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-16 23:18 [gentoo-user] Gentoo Machine Cleanup Samir Faci
2007-07-16 23:29 ` Mark Knecht
2007-07-16 23:45   ` Albert Hopkins
2007-07-17  6:27   ` Abraham Marín Pérez
2007-07-17 15:51     ` Samir Faci
2007-07-17 16:03       ` Neil Bothwick
2007-07-17 16:27       ` Alan McKinnon
2007-07-17  0:31 ` Neil Bothwick
2007-07-17  4:40 ` Canek Peláez
2007-07-17 16:43 ` Dirk Heinrichs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox