I couldn’t figure out how to use pamac install --as-deps

the man page has this

               mark all packages installed as a dependency

the wiki has nothing Pamac - Manjaro honestly couldn’t figure out how to use it. An example in the man page would be nice

--as-deps mean you install package as dependency. It’s useful when you need install missing/optional dependency for program. When in future you will remove this program that library will show on orphans list (if no other dependencies).

Here you can read more about this pacman - ArchWiki



man pamac


pamac --help

There’s also a separate help option for each command; i.e.,

pamac install --help

As @Tomek mentioned, it’s the same as the Pacman flag:


Install packages non-explicitly; in other words, fake their install reason to be installed as a dependency. This is useful for makepkg and other build-from-source tools that need to install dependencies before building the package.

yeah, I get the idea, but not the invocation, I wasn’t able to figure out how to invoke pamac such that it defined something as a dependency of something else. Hence the request for further documentation as the documentation doesn’t look like it mirrors pacman’s api.

I’m not sure the equivalent to that has been added. @guinux ?

sudo pacman -D --asdeps package-name

–asdeps is in -h (users use more -h than “man” :wink: )

if you want add this option in man, exists manjaro gitlab :wink:

pamac --as-deps <package>

yeah, but deps of what? hence confusion

It already is:

man pamac | less -p --as-deps

No such command. You’d have to use the install or reinstall option.

you don’t understand anything about pacman!
dependencies are calculated dynamically (search in others packages): being marked as-deps just means “not implicit” so it’s possible to be orphaned

we mark --as-deps only for that package doesn’t stay in our system forever if no application uses it

sometime, i install some package (python,…) --as-deps but is a dependency of nothing : is only for test some self script - so I won’t forget to delete it a few days later (is orphan)

1 Like

right, I meant install, typo

maybe it should be --as-orphan, because it’s not the deps of anything.

I am because for me:

  • the user who doesn’t know asks “why”
  • the user who understands modifies the doc (wiki is open…)

for me, with your firsts messages, I thought you were an advanced user (sorry to be an idiot and my english doesn’t help)

repeat : not exists : pacman search in packages if this dep is in


pacman -Si vlc
Depends On      : a52dec  libdvbpsi  libxpm  libdca  libproxy  lua52  libidn  libmatroska  taglib  libmpcdec  ffmpeg  faad2  libmad  libmpeg2
                  xcb-util-keysyms  libtar  libxinerama  libsecret  libupnp  libixml.so=11-64  libupnp.so=17-64  libarchive  qt5-base  qt5-x11extras
                  qt5-svg  freetype2  fribidi  harfbuzz  fontconfig  libxml2  gnutls  libplacebo  wayland-protocols
Optional Deps   : avahi: service discovery using bonjour protocol
                  aom: AOM AV1 codec
                  gst-plugins-base-libs: for libgst plugins
                  dav1d: dav1d AV1 decoder
                  libdvdcss: decoding encrypted DVDs
                  libavc1394: devices using the 1394ta AV/C
                  libdc1394: IEEE 1394 access plugin
                  kwallet: kwallet keystore
                  aribb24: aribsub support
                  aribb25: aribcam support
                  pcsclite: aribcam support

pacman not write in database "XXX* have master “YYYY” it’s the opposite :

pacman find in all(***) installed packages if XXX is in “Optional Dep” or “dep”
if XXX is in nothing, and if "XXX* is NOT explicitly installed is orphan
why we install always dependencies with --as-deps if is an explicitly install


pacman -Sii yay  # use ii not i
Required By     : None
Optional For    : octopi  pacui  pacui-git  update-notifier

–as-depps == --can-orphan :wink: not a library or application … (some deps are apps)

  • the user who doesn’t know asks “why”

the developer who doesn’t document gets asked why. Documentation saves developers time (in theory), I did look first, and i found the existing documentation wanting.

  • the user who doesn’t know asks “why”

sounds like that would be you then, thanks for volunteering :wink:

I guess I was hoping that you could write

pamac install --as-deps vim-spell-en

and somehow have vim-spell-en show up as a vim dependency and not get removed unless vim was, but when vim was removed, it would be an orphan and get removed with it. Oh well.

I don’t fully consider wiki’s to be documentation, or at least they aren’t appropriate as official documentation. 2 reasons

  1. Gentoo lost it’s entire wiki in 2008 due to failure in backup process. Servers fail, backups aren’t tested, etc.
  2. People change software, wiki’s are not as portable as source code, so they’re hard to migrate, even worse if you don’t have access to the database.
  3. Wiki’s stay stale for far longer than actual documentation, mostly because documentation bugs get reported as such, and great developers will fix them. Wiki’s on the other hand are left to the … whimsy tyranny of the masses. I’ve definitely seen out of date content recently on the arch wiki, and bad or insufficient content here, IMHO, on forum posts, that resulted in system brokenness. There’s no guarantee that content on a wiki will remain applicable even a few years from now.

On the other hand, sometimes developers don’t fix things, and a wiki is necessary to document the workarounds.

That’s exactly correct.

Yes use pamac remove --orphans vim

1 Like

except that’s not what it does

manjaro /]# pamac install --as-deps vim-spell-en
Synchronizing package databases...
Warning: fprintd: ignoring package upgrade (1.90.9-1 => 1.92.0-1)
Resolving dependencies...
Checking inter-conflicts...

To install (1):
  vim-spell-en  20190731-2    community  

Total installed size: 4.0 MB

Apply transaction ? [y/N] y
Checking keyring...                                                                            [1/1]
Checking integrity...                                                                          [1/1]
Loading packages files...                                                                      [1/1]
Checking file conflicts...                                                                     [1/1]
Checking available disk space...                                                               [1/1]
Installing vim-spell-en (20190731-2)...                                                        [1/1]
Transaction successfully finished.
[manjaro /]# pamac remove -o
Checking dependencies...

To remove (2):
  vim-spell-en  20190731-2    community
  python-babel  2.9.1-1       community

Total removed size: 32.4 MB

it’s not the dependency of anything, it woudl be more apt to say --as-oprhan because it’s implicitly orphaned out of the box.

I’m still not sure why you’re not understanding. Explicitly installed programs are either default at install time or installed by the user. Take vlc for example. A user would explicitly install it and then choose which optional dependencies they need from the rather long list. Those should all be installed as dependencies, not explicitly. That way, if vlc was ever removed, it’s optional dependencies would be orphaned if nothing else required them.

As you observed, there’s no reason to install something as a dependency if nothing requires it as it would be an orphan.

1 Like