You are not logged in.

#1 2015-08-01 00:12:11

chiruLL
Member
Registered: 2015-07-31
Posts: 10

[SOLVED]Pacman remove operations

I am trying to remove xfce and gnome, but pacman is trying to uninstall some packages that i installed explicitly, like xfce4-terminal.
I am using the -Rs option. Accord to the manual -s does :

man pacman wrote:

-s,
Remove each target specified including all of their dependencies,
provided that (A) they are not required by other packages; and (B)
they were not explicitly installed by the user
. This operation is
recursive and analogous to a backwards --sync operation, and it
helps keep a clean system without orphans. If you want to omit
condition (B), pass this option twice.

I think that it can occur with other packages, which is pretty dangerous.
Without the -s option for gnome :

sudo pacman -R gnome
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: cheese: requires gnome-desktop
:: gtk3: requires adwaita-icon-theme

So, there is a safe way to unninstall a group package like xfce or gnome and his denpendencies without unninstalling the used and previous explicitly installed packages ?

Last edited by chiruLL (2015-08-01 13:33:11)

Offline

#2 2015-08-01 00:44:27

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,399
Website

Re: [SOLVED]Pacman remove operations

Look at the man page some more   (hint, you want to remove *unneeded* packages).

Offline

#3 2015-08-01 01:00:22

chiruLL
Member
Registered: 2015-07-31
Posts: 10

Re: [SOLVED]Pacman remove operations

i tried it. But for some reason pacman -Ru still trying to remove xfce4-terminal. I also tryed to reinstall xfce4-terminal just to make sure that it was marked as explicitly. Even with -Ru or -Rus pacman still trying to unninstall xfce4-terminal. I know i could just reinstall xfce4-terminal after, but i think i can have some surprises on future with same situations

explicitly installed packages wrote:

$ pacman -Qe | grep xfce4-terminal
xfce4-terminal 0.6.3-2

dont install explicitly packages? wrote:

sudo pacman -Ru(even with -s) xfce4
other xfce4 stuff ... xfce4-terminal-0.6.3-2 ...

Offline

#4 2015-08-01 01:19:12

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,399
Website

Re: [SOLVED]Pacman remove operations

Most of xfce4 will be explicitly installed...  "pacman -Sg xfce4" will show everything explicitly installed when you installed the xfce4 group.   Pick the ones you don't want and remove them.

Offline

#5 2015-08-01 02:21:16

chiruLL
Member
Registered: 2015-07-31
Posts: 10

Re: [SOLVED]Pacman remove operations

So there is no way to keep the manually installed stand alone packages after unninstall a group ? I just realized that after i unninstalled cinnamon and gnome with -R, NetworkManager was unninstalled. Unninstalling a group with -Rsu will not take care of protect stand alone packages sad
There is no way to protect these stand alone packages ?(typing packages names from a group 1 by 1 will be longstanding, but i can do it if is the only way)

Last edited by chiruLL (2015-08-01 02:28:54)

Offline

#6 2015-08-01 05:46:36

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,399
Website

Re: [SOLVED]Pacman remove operations

Those packages are part of the group, or installed as dependencies of packages in the group.  How is pacman supposed to know that you want to remove a group, but not all of it?

Offline

#7 2015-08-01 09:48:52

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]Pacman remove operations

You can export the list of packages you want to keep and reinstall them after you remove the whole group.

Offline

#8 2015-08-01 11:36:02

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

Re: [SOLVED]Pacman remove operations

Other than removing them all and reinstalling, you could do the following - which would be more commands, but it would prevent your from ever being without a desired package installed:

pacman -D --asdeps xfce4
pacman -D --asexplicit xfce4-terminal # and NetworkManager etc
pacman -Ru xfce4

I think the confusion here is between groups and metapackages.  A metapackage can be made that depends on everything in xfce.  So when you install this single package 'xfce-meta' all of xfce is pulled in as a dependency.  Then if you explicitly install one of those dependencies, then remove xfce-meta (with Rs) then all of the xcfe stuff *except* for those you explicitly installed will be removed.  This sounds like what you expect to happen here - but groups are not metapackages.

With a xfce group (correct me if I'm wrong Allan) pacman 'sees' the group name xfce4 and essentially just expands that to the list of group members.  So - at least functionally, after the prompt of which packages to install - there is no difference between the following two command:

pacman -S xfce4
pacman -S exo  garcon  gtk-xfce-engine  thunar  thunar-volman ...

By installing the group, you have explicitly installed all of the group members (or any that you selected from pacman's initial prompt).  Later reinstalling xfce4-terminal explicitly changes nothing - it was already installed explicitly like all the other members of the group.


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

Offline

Board footer

Powered by FluxBB