# GF19: Emerge fails to unmerge a package.

## kallamej

Navigation: [Gentoo Fundamentals] [Table of Contents]

Q: I have upgraded a package, but the old version fails to unmerge. What should I do if:

It complains about an unexpected EOF while looking for matching `"' in /var/db/pkg/<cat>/<pkg-version>/<pkg-version>.ebuild?

A: This is caused by an old bug that replaced a " with, typically, ^A. Edit the ebuild in /var/db/... manually, or try running the (unmaintained) fixvardbentries script.

See Unexpected EOF error on unmerging for more info and support.

It complains about a missing eclass?

A: There are a number of ways to solve this: 

 Grab the old eclass from CVS and put it in /usr/portage/eclass, before unmerging

 Edit the saved ebuild in /var/db/pkg/<cat>/<pkg-version>

 Remove the files installed by the ebuild by hand

Taken from this post in Cannot unmerge due to missing eclass. Note that if you're using ebuilds from an overlay, you have to be careful with eclasses from that overlay. Such eclasses must be kept as long as you have an ebuild from that overlay still installed.

I get a traceback?

A: There is probably corruption in your package database. Check the files in /var/db/pkg/<cat>/<pkg-version> for null characters, carriage returns or whatever else that shouldn't be there. Chances are that re-emerging the old version and then upgrading solves the problem. More info can be found here, here and here, for instance.

2005-08-08: Updated unexpected EOF section since fixvardbentries is no longer distributed with portage.  --kallamej

2006-06-29: Added note about eclasses and overlays.  --kallamej

2007-05-19: Added one more link to the traceback section and switched to post and topic tags.  --kallamej

----------

