You are not logged in.

#1 2019-02-10 17:52:52

minomic
Member
Registered: 2017-09-30
Posts: 9

[Solved] Trying to remove orphan packages wants to remove too much

If I try to use the command

sudo pacman -Rns $(pacman -Qtdq)

(found in the wiki) to remove orphan packages, this is what I get:

> sudo pacman -Rns $(pacman -Qtdq)
[sudo] password for user: 
checking dependencies...

Packages (7) dkms-2.5-4  virtualbox-host-dkms-6.0.4-1  gendesk-1.0.2-1
             libnm-gtk-1.8.19dev+21+geebf7f95-1  muparser-2.2.6-1
             python2-cssutils-1.0.2-2  virtualbox-6.0.4-1

Total Removed Size:  194.47 MiB

Why does this happen? I mean, why should I want to remove virtualbox and dkms from my system? I remember I used to use this command quite often, even when virtualbox was already installed, and this didn't usually happen...

Last edited by minomic (2019-02-10 18:21:20)

Offline

#2 2019-02-10 17:58:25

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 20,904
Website

Re: [Solved] Trying to remove orphan packages wants to remove too much

Because - apparently - virtualbox's installation reason on your system was as a dependency for something else.  Check it out by breaking down that command:

pacman -Qtdq
pacman -Qi virtualbox

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2019-02-10 18:11:00

minomic
Member
Registered: 2017-09-30
Posts: 9

Re: [Solved] Trying to remove orphan packages wants to remove too much

Indeed you're right:

> pacman -Qi virtualbox
Name            : virtualbox
Version         : 6.0.4-1
Description     : Powerful x86 virtualization for enterprise as well as home use
Architecture    : x86_64
URL             : https://virtualbox.org/
Licenses        : GPL  custom
Groups          : None
Provides        : None
Depends On      : glibc  openssl  curl  gcc-libs  libpng  python  sdl  libvpx  libxml2  procps-ng
                  shared-mime-info  zlib  libxcursor  libxinerama  libx11  libxext  libxmu  libxt  opus
                  qt5-base  qt5-x11extras  VIRTUALBOX-HOST-MODULES
Optional Deps   : vde2: Virtual Distributed Ethernet support
                  virtualbox-guest-iso: Guest Additions CD image
                  virtualbox-ext-vnc: VNC server support
                  virtualbox-sdk: Developer kit [installed]
Required By     : None
Optional For    : None
Conflicts With  : virtualbox-ose
Replaces        : virtualbox-ose
Installed Size  : 176.86 MiB
Packager        : Christian Hesse <arch@eworm.de>
Build Date      : Mon 28 Jan 2019 16:36:33 CET
Install Date    : Sun 10 Feb 2019 18:06:42 CET
Install Reason  : Installed as a dependency for another package
Install Script  : Yes
Validated By    : Signature

The question is then, what can I do to keep virtualbox and still be able to use that useful command to remove orphan packages?

Offline

#4 2019-02-10 18:16:34

mpan
Member
Registered: 2012-08-01
Posts: 478
Website

Re: [Solved] Trying to remove orphan packages wants to remove too much

Mark it as explicitly installed. See:

pacman -D --help

Sometimes I’m a bit harsh — don’t get offended too easily!
PGP: 7C848198AE93D3BB | Coreutils SHA2 performance
Russian roulette: curl "https://ptpb.pw/$(cat /dev/urandom | tr -cd [:alnum:] | head -c 4)" | sudo bash

Offline

#5 2019-02-10 18:21:05

minomic
Member
Registered: 2017-09-30
Posts: 9

Re: [Solved] Trying to remove orphan packages wants to remove too much

I confirm that

sudo pacman -D --asexplicit virtualbox

solved the issue. Marking as solved, thanks!

Offline

Board footer

Powered by FluxBB