User:Sam/Portage help/Upgrade went wrong

Sometimes, maybe an upgrade doesn't go well and you don't know what to do, despite following these excellent tips to keep your system in good shape: this page is for when that happens.

General tips:
 * 1) Read your news items first.
 * 2) Do share full output of all commands in support channels: don't cut off bits.
 * 3) Never unmerge anything unless told to by a news item or a support channel as a last resort. Unmerging things is not a normal operation to have to do.
 * 4) Check your world file for junk.
 * 5) Use  on  invocations.
 * 6) Start from the bottom upwards: the most fatal error is usually right down the bottom and causes noise above it. Resolving the bottommost issues usually sorts out the rest.

Long list of dependency conflicts
As above, start from the bottom and work upwards. Resolve one issue at a time then run again.

Rough steps:
 * 1) Check your world file (and follow the General tips listed above first).
 * 2) Check  for stale e.g.   (same for dev-haskell, games) entries (e.g. tightly versioned =dev-qt/foo-1.2.3 entries).
 * 3) Either no Qt should be in  or all of Qt needs to be in there. Ditto Haskell.
 * 4) Make sure there's no too-specific entries like =games-misc/foo-1.2.3 which prevents it being upgraded.
 * 5) If there's something obvious at the bottom (e.g. autounmask /  /  changes suggested), act on it.
 * 6) If there's nothing obvious at the bottom changes suggested, try more backtracking first:.
 * If, at this point, the entire thing looks like a huge wall with nothing easy, try: . This often leads to shaking out missing/outdated  entries.
 * 1) For any lines that say "there are no ebuilds to satisfy ...", there are a few options:
 * 2)  for any packages which are no longer desired
 * 3) Fix the issue preventing them being installed (e.g. add them to )
 * 4) Run until there are no fixable issues
 * 5) Try  again.
 * 6) Failing that, try . This should reveal some more output and allow further diagnosis of the problem. It's best not to use this option to do the upgrade (without pretend) unless truly needed. If it is used for the full upgrade, one must run  afterwards.

(A common issue here is overly restrictive entries for e.g. games, Haskell, ...)