# [FAQF] SA5:  Things to not unmerge or remove.

## unixownz

Hey.. Ya.. I am an uber n00b..

I never looked to see what the package glibc did...

OH my.. 

I was trying to play a game that said it needed glibc2.1.

So, I assumed that glibc was never installed, so I just emerged the most recent version.. glibc2.2... The game gave the same error, and looking at the ebuilds, I noticed that glibc2.1 was no longer apart of the ebuilds.. So I just said, why waste space? and unmerged my glibc2.2 file...

>>>OMG !! >> 

THINGS NOT TO UNMERGE

My system can not do ANY COMMAND.. BASH TCSH.. all shells can not be found... ... so I can not emerge back in... 

I still have the installcd... so I can boot off of that... but.... what do i do ???

HELP ! ( I dont want to reinstall everything.. it too forever to get everything up)

EDIT:

Made thread into FAQ Feedback for [url=][/url].

Changed title from "THINGS NOT TO UNMERGE !! DOH !! HELP !! DOH SOME MORE !".

----------

## rac

In the future, either turn on the buildpkg feature in /etc/make.conf, or make sure you emerge critical packages with the -b flag.  That having been said, Lost GCC, or How to emerge GCC without GCC discusses a similar issue, and some of the techniques should be adaptable to repairing glibc as well.  Good luck.

----------

## unixownz

Thx

I read the GCC file, and went searching through all my directrions to cat the CONTENTS of the glibc directory.. but I cant find it.. I looked everywhere... Where is it located? I can only find glib and glibc in the tmp directory..

What should I do ?

----------

## rac

You can either boot from a rescue CD and look for it there, or extract it out of a stage tarball.

----------

## unixownz

 *rac wrote:*   

> You can either boot from a rescue CD and look for it there, or extract it out of a stage tarball.

 

... I have no idea where do i get the rescue cd ?

I am using the install cd I dled from the mirrors... 

I hope I did this right.. I untar'd the stage1 tar ball right over everything...

Scary.. Ok.. and I located the glibc file... 

Bash says it doesnt have perl installed

How do I install it without chroot ?

Sorry I am such a n00b..

Thx

----------

## unixownz

 :Sad: 

I know perl is usually installed by default... but not on the 

boot cd... anyway around formating ?

----------

## rac

Hmm...no perl on the install CD, and the one on your hard disk won't work because glibc is gone, eh?  Unfortunately, the only think I can think of now is to unpack a stage 1 tarball across your root partition.  When you have some time, you will probably want to reemerge glibc and "emerge -e system".

----------

## unixownz

Hey rac 

thanks soo much for all the help.  at least I dont have to format.  Since the server was going to be down anyway I will emerge -e system over night or two.. hhehe... 

Next time I will be more careful and definately will use emerge -b and that package builder you were talking about.

Is there anything else I can do that 's a big no no and will screw me ? 

Because I want to know now, so I can avoid them in the future.. 

with all these blunders, I have been able to help out others that pm me.. hehe I learn the hard way for everything..

Once more tho, thank you.

----------

## rac

 *unixownz wrote:*   

> Is there anything else I can do that 's a big no no and will screw me ? 

 

Don't delete /var/db/pkg.  Someone did that recently.  Other things that should definitely not be unmerged, along with glibc: pythongccbinutilsbaselayoutbash

----------

## unixownz

Thx..

Oh here is the update.. 

My comp = hosed... Nothing worked anymore after I remergged the glic files..  and the emerge -e system..

Its ok...

I am formatting right now..

.. I am learning linux tho... 

the hard way...

Thanks for all your help rac   :Wink: 

----------

## Edgaer

Well while we're talking about things one shouldn't unmerge, don't unmerge grep. Basically what happens is that, the configure scripts that all packages (including grep) use to configure the compile make use of grep. I'm not sure if you can compile it manually as suggested in this thread will work but basically the only way I had to fix things was to download the redhat grep executables from my school's lab server and put those in my path to remerge grep.

And those interested in a link, for my experiences with unmerging grep (and those that haven't figured out that I've linked to it already  :Wink: ) here it is,

https://forums.gentoo.org/viewtopic.php?t=10343&highlight=grep

----------

## dberkholz

If you completely screw up and remove /var/db/pkg, Cyfred is working on a script to restore it. Check out Restoring /var/db/pkg? for more info.

----------

## Once

This is what I missed while reviewing the list of packages that depclean was going to take out.

fileutils

textutils

sh-utils

BAD BAD BAD. 

I am currently copying over binaries such as cp, ls, rm, from my system backup so that I can get emerge up an running again.

----------

## dberkholz

 *Once wrote:*   

> This is what I missed while reviewing the list of packages that depclean was going to take out.
> 
> fileutils
> 
> textutils
> ...

 

Those are old, and everything they provide is now provided by coreutils.

----------

## ronvenema

Removing ncurses is also very bad indeed. I innocently removed ncurses in order to change versions. It was not a pretty site. Emerge and other programs went south. I had to untar the stage3 in a temp dir and manually place the ncurses library files in the appropriate directories and was then able to emerge ncurses.

----------

## toylas

Hi All,

I installed gentoo on a 5G partition on a really old comp. The base installation with a few things like (mplayer, evince, xfce,fluxbox, gnuplot and a couple more) grew to over 3G. I moved pportage to a bigger partition following the FAQ given here. Even after that the base installation remains over 2G. I noticed I had both gcc-4.1.1 and gcc-3.3.6, both qt-3.3.8 and qt-4.2.3 installed. Will it be safe to remove the older versions? Also how can I find out other unused packages which are safe to remove?

Thanks,

Tulasi

----------

## chithanh

please add coreutils to the list (bug 217239 caused some people to unmerge it).

----------

## chithanh

Please also add portage to the list (bug 244975)

----------

## notHerbert

 *toylas wrote:*   

> Hi All,
> 
> I installed gentoo on a 5G partition on a really old comp. The base installation with a few things like (mplayer, evince, xfce,fluxbox, gnuplot and a couple more) grew to over 3G. I moved pportage to a bigger partition following the FAQ given here. Even after that the base installation remains over 2G. I noticed I had both gcc-4.1.1 and gcc-3.3.6, both qt-3.3.8 and qt-4.2.3 installed. Will it be safe to remove the older versions? Also how can I find out other unused packages which are safe to remove?
> 
> Thanks,
> ...

 

You can remove gcc-3.3.6 if you don't use it. Run gcc-config -l to see which profile is active. Look  here for detailed information

Then to  remove gcc-3.3.6 run

```
emerge --nodeps --prune --ask gcc
```

You can see and remove what else is cluttering your system by running this, but emerge gentoolkit first if you don't have it installed,

```
emerge -uDNav world

emerge --depclean -av

revdep-rebuild -- --ask
```

----------

## chithanh

Please add "libpcre if grep is compiled with USE=pcre" to the list.

If you unmerge it, then grep will stop working and emerging grep fails with something like this

```
checking for grep that handles long lines and -e... configure: error: no acceptable grep could be found in /usr/lib64/portage/bin/ebuild-helpers:/usr/local/sbin:/sbin:/usr/sbin:/usr/local/bin:/bin:/usr/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/3.4.5:/usr/xpg4/bin
```

----------

## Mike Hunt

Looks like eselect-python belongs  in this list

----------

## chithanh

Please add dev-libs/gmp to the list (bug 308461)

----------

