[solved] Sudo pacman -Rs package wants to remove shared dependencies, so does pamac


From what I've read, sudo pacman -Rs + package(s) should only remove the package and any exclusive dependencies, i.e. not used/shared by other packages.

When I used the command, it warned me that another package depended on another package and removed it anyway. I had made a note of the package before proceeding. so, I tried with pamac.
I have the option to remove unrequired dependencies on, but that issued the same warning and went ahead and removed the package. I thought that it is supposed to leave shared dependencies alone.

What is the package and what is dependent on it?

I had installed Ardour, but it never executed, so I removed it. I think it depended on python2-numpy, which is also used by Inkscape.

Here's a history log:

[2017-07-18 00:12] [ALPM] transaction completed
[2017-07-18 00:12] [ALPM] removed aubio (0.4.2-2)
[2017-07-18 00:12] [ALPM] removed liblrdf (0.5.0-3)
[2017-07-18 00:12] [ALPM] removed blas (3.7.1-1)
[2017-07-18 00:12] [ALPM] removed cblas (3.7.1-1)
[2017-07-18 00:12] [ALPM] removed lapack (3.7.1-1)
[2017-07-18 00:12] [ALPM] removed python2-numpy (1.13.1-2)
[2017-07-18 00:12] [ALPM] removed serd (0.22.0-1)
[2017-07-18 00:12] [ALPM] removed sord (0.14.0-1)
[2017-07-18 00:12] [ALPM] removed lv2 (1.14.0-2)
[2017-07-18 00:12] [ALPM] removed sratom (0.4.6-1)
[2017-07-18 00:12] [ALPM] removed lilv (0.22.0-2)
[2017-07-18 00:12] [ALPM] removed suil (0.8.2-2)
[2017-07-18 00:12] [ALPM] removed ardour (5.9-2)
[2017-07-18 00:12] [ALPM] transaction started
[2017-07-18 00:10] [PACMAN] Running 'pacman -Rs Ardour5'

Probably because it is an optional dependency

Optional Deps   : gvfs: import clip art
                  pstoedit: latex formulas
                  python2-scour: optimized SVG output
                  texlive-core: latex formulas
                  python2-numpy: some extensions
                  python2-lxml: some extensions and filters
                  uniconvertor: reading/writing to some proprietary formats

But I don't see Inkscape is being removed here in the log....

I see, so if it's optional, it is not considered to be a shared resource?

Looking at the dependencies list for Ardour, python2-numpy is not listed:


But python2-numpy was.

Then what you need to do is mark `"explicit" on the package, since the package listed as just opt depends and probably you install it individually....

sudo pacman -D --asexplicit python2-numpy

* There, I'm done editing

It is a dependency of lilv

When it is optional it warns you and then removes it anyway. Which is probably what you saw

--asexplicit is what you want

EDIT: Somehow I managed to triple post

1 Like

Okay, thank you. There is quite a lot of following-up to do after installing packages. I think knowing what to mark as explicit needs knowledge of the dependency tree.

It probably was. Well, when I see that, I can then go and mark it as explicit, and then resume removal. It might be safer than just 'y' to everything. I'd rather keep a package than remove it and forget why another package no longer works.

Thank you for your assistance. I'll mark this as solved.

in general, i think simply installing packages works for the average user. the average user does not know anything about optional dependencies.

but i agree with your assessment for advanced users. this is the reason why i have included easy options to show packages information and the (reverse) dependency tree of packages in pacui.
i have not included an option to mark a package as explicitly installed, because you can achieve the same thing by manually (re-)installing a package.
if you are a user, who thinks about (optional) dependencies, you might be interested in pacui, which essentially is a CLI package manager. please also look at its optional dependencies when you install it.

Thank you for your input. The experience and the helpfulness of the community have made me more aware of packages. I have indeed been an 'average user' even though I am not afraid to delve into things a bit. Now I know about optional dependencies, I'll certainly pay more attention to them, and find out what they do.

I'll look into pacUI. I think it'll offer lots of learning opportunities.

in that case, i recommend to take a look at the detailed help page of pacui: https://github.com/excalibur1234/pacui#detailed-pacui-help
it explains every command used in detail.
if you are interested in even more information, please visit the arch linux wiki. it explains almost everything about arch/manjaro and is a great resource to learn how linux really works!

I used pacUI today because updates wouldn't install, so thank you again for pointing out this great utility.
I'll certainly go through the wiki. I read the Manjaro wiki on how to install Xfce after a KDE install, but what I had to do was not as simple as the two steps in the wiki. The helpful community came to my rescue.

All the best.

1 Like

Forum kindly sponsored by