0

On a freshly installed Gentoo 2.13 system, I ran these commands to install my first package:

$ cat /etc/gentoo-release
Gentoo Base System release 2.13
$ sudo emaint -a sync
$ sudo emerge app-editors/emacs
$ emacs                            # It runs successfully

The install was successful. As a test, I immediately tried to remove the same package, and the operation failed:

$ sudo emerge -cav app-editors/emacs

Calculating dependencies... done!
  app-editors/emacs-29.1-r1 pulled in by:
    app-emacs/emacs-common-1.9 requires >=app-editors/emacs-23.1:*

>>> No packages selected for removal by depclean

Why does this happen? Did I issue the wrong remove command? I would think that the simplest test of a package manager is to install and remove a package on a fresh copy of the OS.

Thank you very much for any clarity.

3 Answers 3

1

Explanation

As @Dean Brundage has correctly stated Big C stands for Clean WITHOUT checking for dependent packages. Small c stands for clean with dependent packages. In your example app-emacs/emacs-common is a reverse dependency of app-editors/emacs

The proper way to uninstall this would be:

  1. emerge -cav app-emacs/emacs-common
  2. emerge -cav app-editors/emacs

This properly removes the dependency and the requested package.

0

You're looking for --unmerge, -C

   --unmerge, -C
          WARNING: This action can remove important packages! Removes  all
          matching  packages  following a counter governed by CLEAN_DELAY.
          This does no checking of dependencies, so it may remove packages
          necessary  for  the  proper operation of your system.  Its argu-
          ments can be atoms or ebuilds. For a dependency aware version of
          --unmerge,  use  --depclean  or  --prune.   For  a  version with
          CLEAN_DELAY=0, use --rage-clean.

-c is --depclean which removes packages that are not associated with explicitely merged packages.

0

When you explicitly install a package it is added to the world packages file. Portage ignores these packages when cleaning for packages that have no packages that depend on it.

If you want to explicitly remove the package use the --unmerge flag. However this can cause problems if you add other packages that depend on the unmerged package without knowing it. The recommended solution is to use the --deselect flag to remove the package from the world file then do a dependency clean up.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .