User:Librecat

From Gentoo Wiki
Jump to:navigation Jump to:search

Removing packages properly

As we all know emerge -C is dangerous and we should use emerge -c instead. But some people have trouble using it so i decided to make a funny guide

Example 1: trying to get rid of cmake desktop icon

lets try removing cmake with emerge -c now

root@librecat ~ # emerge -c cmake
Calculating dependencies... done!
>>> No packages selected for removal by depclean
>>> To see reverse dependencies, use --verbose
Packages installed:   890
Packages in world:    123
Packages in system:   48
Required packages:    890
Number to remove:     0

as you can see it doesn't remove so let's do what is says and add --verbose

root@librecat # emerge -c --verbose cmake
Calculating dependencies... done!
  dev-util/cmake-3.26.4-r1 pulled in by:
    app-admin/keepassxc-2.7.5-r1 requires >=dev-util/cmake-3.20.5
    app-arch/brotli-1.0.9-r5 requires >=dev-util/cmake-3.20.5
    app-arch/lz4-1.9.4 requires >=dev-util/cmake-3.20.5
    app-editors/neovim-0.9.0-r1 requires >=dev-util/cmake-3.20.5
    app-i18n/uchardet-0.0.7 requires >=dev-util/cmake-3.20.5
    app-mobilephone/heimdall-2.0.1 requires >=dev-util/cmake-3.20.5
    app-shells/starship-1.14.2 requires dev-util/cmake
    app-text/cmark-0.30.3 requires >=dev-util/cmake-3.20.5
    app-text/poppler-23.05.0 requires >=dev-util/cmake-3.20.5
    app-text/qpdf-11.3.0 requires >=dev-util/cmake-3.20.5
    dev-cpp/gulrak-filesystem-1.5.12 requires >=dev-util/cmake-3.20.5
    dev-cpp/yaml-cpp-0.7.0-r2 requires >=dev-util/cmake-3.20.5
    dev-libs/date-3.0.0 requires >=dev-util/cmake-3.20.5
    dev-libs/double-conversion-3.2.1 requires >=dev-util/cmake-3.20.5
    dev-libs/json-c-0.16-r1 requires >=dev-util/cmake-3.20.5
    dev-libs/libfmt-9.1.0-r1 requires >=dev-util/cmake-3.20.5
    dev-libs/msgpack-5.0.0 requires >=dev-util/cmake-3.20.5
    dev-libs/plasma-wayland-protocols-1.10.0 requires >=dev-util/cmake-3.20.5
    dev-libs/quazip-1.3-r2 requires >=dev-util/cmake-3.20.5
    dev-libs/spdlog-1.11.0-r2 requires >=dev-util/cmake-3.20.5
    dev-lua/luv-1.44.2.0 requires >=dev-util/cmake-3.20.5
    dev-qt/qt-creator-8.0.2 requires >=dev-util/cmake-3.20.5
    dev-util/android-tools-34.0.0 requires >=dev-util/cmake-3.20.5
    dev-util/glslang-1.3.246 requires >=dev-util/cmake-3.20.5
    dev-util/lldb-16.0.5 requires >=dev-util/cmake-3.20.5, >=dev-util/cmake-3.16
    dev-util/spirv-headers-1.3.246 requires >=dev-util/cmake-3.20.5
    dev-util/spirv-tools-1.3.246 requires >=dev-util/cmake-3.20.5
    dev-util/vulkan-headers-1.3.246 requires >=dev-util/cmake-3.20.5
    games-action/prismlauncher-7.1 requires >=dev-util/cmake-3.20.5
    games-emulation/mgba-0.10.2 requires >=dev-util/cmake-3.20.5
    kde-frameworks/breeze-icons-5.106.0 requires >=dev-util/cmake-3.20.5
    kde-frameworks/extra-cmake-modules-5.106.0 requires >=dev-util/cmake-3.20.5
    kde-frameworks/kwayland-5.106.0 requires >=dev-util/cmake-3.20.5
    kde-frameworks/kwindowsystem-5.106.0 requires >=dev-util/cmake-3.20.5
    kde-frameworks/syntax-highlighting-5.106.0 requires >=dev-util/cmake-3.20.5
    kde-plasma/kwayland-integration-5.27.5 requires >=dev-util/cmake-3.20.5
    media-gfx/graphite2-1.3.14_p20210810-r3 requires >=dev-util/cmake-3.20.5
    media-libs/freeglut-3.4.0 requires >=dev-util/cmake-3.20.5
    media-libs/glfw-3.3.8 requires >=dev-util/cmake-3.20.5
    media-libs/libjpeg-turbo-2.1.5.1 requires >=dev-util/cmake-3.20.5
    media-libs/libsdl-1.2.64 requires >=dev-util/cmake-3.20.5
    media-libs/openal-1.23.1-r1 requires >=dev-util/cmake-3.20.5
    media-libs/openjpeg-2.5.0-r4 requires >=dev-util/cmake-3.20.5
    media-libs/phonon-4.11.1-r2 requires >=dev-util/cmake-3.20.5
    media-libs/phonon-vlc-9999 requires >=dev-util/cmake-3.20.5
    media-libs/shaderc-2023.3 requires >=dev-util/cmake-3.20.5
    media-libs/vulkan-loader-1.3.246 requires >=dev-util/cmake-3.20.5
    media-sound/apulse-0.1.13-r2 requires >=dev-util/cmake-3.20.5
    net-libs/libproxy-0.4.18 requires >=dev-util/cmake-3.20.5
    net-libs/libssh-0.10.5 requires >=dev-util/cmake-3.20.5
    net-libs/libssh2-1.11.0 requires >=dev-util/cmake-3.20.5
    sys-devel/clang-14.0.6-r1 requires >=dev-util/cmake-3.20.5, >=dev-util/cmake-3.16
    sys-devel/clang-16.0.5 requires >=dev-util/cmake-3.16, >=dev-util/cmake-3.20.5
    sys-devel/lld-16.0.5 requires >=dev-util/cmake-3.20.5
    sys-devel/llvm-14.0.6-r4 requires >=dev-util/cmake-3.16, >=dev-util/cmake-3.20.5
    sys-devel/llvm-16.0.5 requires >=dev-util/cmake-3.16, >=dev-util/cmake-3.20.5
    sys-libs/compiler-rt-14.0.6-r1 requires >=dev-util/cmake-3.20.5, >=dev-util/cmake-3.16
    sys-libs/compiler-rt-16.0.5 requires >=dev-util/cmake-3.20.5, >=dev-util/cmake-3.16
    sys-libs/compiler-rt-sanitizers-14.0.6 requires >=dev-util/cmake-3.16, >=dev-util/cmake-3.20.5
    sys-libs/compiler-rt-sanitizers-16.0.5 requires >=dev-util/cmake-3.16, >=dev-util/cmake-3.20.5
    x11-misc/qt5ct-1.7 requires >=dev-util/cmake-3.20.5
    x11-terms/alacritty-0.10.1 requires dev-util/cmake
    x11-themes/kvantum-1.0.7 requires >=dev-util/cmake-3.20.5

>>> No packages selected for removal by depclean
Packages installed:   890
Packages in world:    123
Packages in system:   48
Required packages:    890
Number to remove:     0

hmm some packages i need require cmake so i will give up on removing it.....

tip: just remove use -qt5 on cmake to get rid of the gui

Example 2: removing thunar

i like dolphin more than thunar so i wanna remove it

root@librecat # emerge -c --verbose thunar

Calculating dependencies... done!
  xfce-base/thunar-4.18.4 pulled in by:
    xfce-base/thunar-volman-4.18.0 requires >=xfce-base/thunar-1.6[udisks]
    xfce-base/xfce4-meta-4.18 requires >=xfce-base/thunar-4.18.0
    xfce-base/xfdesktop-4.18.1 requires >=xfce-base/thunar-4.17.10:=, >=xfce-base/thunar-4.17.10:0/3=

hmm i switched from xfce to kde so i am fine with removing xfce stuff

root@librecat # emerge -c --verbose thunar-volman

Calculating dependencies... done!
  xfce-base/thunar-volman-4.18.0 pulled in by:
    xfce-base/xfce4-meta-4.18 requires >=xfce-base/thunar-volman-4.18.0
root@librecat # emerge -c --verbose xfce4-meta

Calculating dependencies... done!
>>> Calculating removal order...

 xfce-base/xfce4-meta
    selected: 4.18
   protected: none
     omitted: none

All selected packages: =xfce-base/xfce4-meta-4.18

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...
>>> Unmerging in: 5 4 3 2 1
>>> Unmerging (1 of 1) xfce-base/xfce4-meta-4.18...
Packages installed:   889
Packages in world:    123
Packages in system:   48
Required packages:    889
Number removed:       1

 * GNU info directory index is up-to-date.

nice, finally something removed without emerge -C ! let's see if i can remove thunar now

root@librecat # emerge --depclean --verbose thunar

Calculating dependencies... done!
  xfce-base/thunar-4.18.4 pulled in by:
    xfce-base/thunar-volman-4.18.0 requires >=xfce-base/thunar-1.6[udisks]
    xfce-base/xfdesktop-4.18.1 requires >=xfce-base/thunar-4.17.10:0/3=, >=xfce-base/thunar-4.17.10:=

>>> No packages selected for removal by depclean

hmm still got work to do :( lemme try thunar-volman again

root@librecat # emerge --depclean --verbose thunar-volman
Calculating dependencies... done!
>>> Calculating removal order...

 xfce-base/thunar-volman
    selected: 4.18.0
   protected: none
     omitted: none

All selected packages: =xfce-base/thunar-volman-4.18.0

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...
>>> Unmerging in: 5 4 3 2 1
>>> Unmerging (1 of 1) xfce-base/thunar-volman-4.18.0...

nice!

root@librecat # emerge --depclean --verbose thunar
Calculating dependencies... done!
  xfce-base/thunar-4.18.4 pulled in by:
    xfce-base/xfdesktop-4.18.1 requires >=xfce-base/thunar-4.17.10:0/3=, >=xfce-base/thunar-4.17.10:=

>>> No packages selected for removal by depclean

getting close now, if i remove xfdesktop too i can probably remove thunar

root@librecat # emerge -c xfdesktop -v

Calculating dependencies... done!
>>> Calculating removal order...

 xfce-base/xfdesktop
    selected: 4.18.1
   protected: none
     omitted: none

All selected packages: =xfce-base/xfdesktop-4.18.1

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...
>>> Unmerging in: 5 4 3 2 1
>>> Unmerging (1 of 1) xfce-base/xfdesktop-4.18.1...
Packages installed:   887
Packages in world:    122
Packages in system:   48
Required packages:    887
Number removed:       1

 * GNU info directory index is up-to-date.

root@librecat # emerge -cv thunar

Calculating dependencies... done!
>>> Calculating removal order...

 xfce-base/thunar
    selected: 4.18.4
   protected: none
     omitted: none

All selected packages: =xfce-base/thunar-4.18.4

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...
>>> Unmerging in: 5 4 3 2 1
>>> Unmerging (1 of 1) xfce-base/thunar-4.18.4...
Packages installed:   886
Packages in world:    122
Packages in system:   48
Required packages:    886
Number removed:       1

 * GNU info directory index is up-to-date.

root@librecat #

FINALLY, i removed it