You are not logged in.

#1 2010-10-14 02:40:21

Mecharuva
Member
Registered: 2010-08-28
Posts: 33

View packages depending on selected package

TL; DR: Is there a way to use pacman -Q to see what packages are depending on a particular package?

Basically what's in the title.
I'm always worried about removing packages in Arch here because I don't want to break (an)other package(s).
I have made a file named "dependencies" that lists the dependencies selected by pacman for each package I've installed from the beginning, however it's not necessarily in chronological order, and you know that if you already have a particular package that a new package you're looking to install depends on, it won't tell you it's a dependency, because it's already there!
I'm looking to remove avant-window-navigator and any useless packages left behind, if it matters.

Offline

#2 2010-10-14 02:54:43

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

Re: View packages depending on selected package

> pacman -Qi glibc
Name           : glibc
Version        : 2.12.1-2
URL            : http://www.gnu.org/software/libc
Licenses       : GPL  LGPL
Groups         : base
Provides       : None
Depends On     : linux-api-headers>=2.6.34  tzdata
Optional Deps  : None
Required By    : a52dec  aalib  alsa-lib  attr  audiofile  bash  bash3
                 binutils  bison  bzip2  cabextract  calc  cdparanoia
                 coreutils  cracklib  dcron  device-mapper  dhcpcd  diffutils
                 dmidecode  eject  elfutils  eventlog  expat  faac  fakeroot
                 file  findutils  flac  flex  foomatic-filters  fuse  gawk
....

So that tells you which package need another package.   Pacman won't let you remove a package unless that list is empty anyway.

Read the man page for details on how to remove a package and all its dependencies.

Offline

#3 2010-10-14 02:56:43

Mecharuva
Member
Registered: 2010-08-28
Posts: 33

Re: View packages depending on selected package

Hurp derp. So it was just -Qi? I be an r'tard. Thanks sir!

Offline

#4 2010-10-14 03:01:42

Snowknight
Member
Registered: 2009-06-11
Posts: 55
Website

Re: View packages depending on selected package

EDIT: Since Allan posted before I clicked submit, I'll only add that the pacman and pacman tips wiki articles give a great supplement to the manpage.

Last edited by Snowknight (2010-10-14 03:04:34)

Offline

#5 2010-10-14 03:11:01

Mecharuva
Member
Registered: 2010-08-28
Posts: 33

Re: View packages depending on selected package

One more question. I'm about to perform an upgrade and I'm trying to keep on top of EVERYTHING related to package management; dependencies, recent updated/upgraded packages etc..
Is there a way to output a list of target packages to a specified file?
I have 92 targets for a -Syu operation and I really would rather not type these by hand.

Offline

#6 2010-10-14 03:19:47

Snowknight
Member
Registered: 2009-06-11
Posts: 55
Website

Re: View packages depending on selected package

You really don't need to keep a list of packages that you change. Pacman keeps a good log at /var/log/pacman.log.
But you could get a list of target upgrades by doing something like pacman -Sy && pacman -Qu > upgrades.txt.

Offline

#7 2010-10-14 03:21:28

Mecharuva
Member
Registered: 2010-08-28
Posts: 33

Re: View packages depending on selected package

Oh sweet, didn't know about that log.
See? Been using Linux for a few years now and I'm STILL a noob.
Thanks man.

Offline

Board footer

Powered by FluxBB