Results 1 to 3 of 3

Thread: Package Dependency Queries

  1. #1
    Join Date
    Nov 2007
    Beans
    26

    Question Package Dependency Queries

    I'm still climbing up the learning curve for apt/dpkg etc.. I'm trying to work out how to find out what packages depend on a given package.

    Preferably at the command line; also with the option to scan either just installed packages or all available packages in the currently configured repositories.

    (I can see a crude way to do the former: fire up adept_manager or similar, select package for deletion and see what else would be deleted as well. but that's not very elegant!)

    Could someone point me in the right direction please?

  2. #2
    Join Date
    Jan 2007
    Location
    $here ? $here : $there
    Beans
    3,717
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Package Dependency Queries

    Quote Originally Posted by professorYaffle View Post
    I'm still climbing up the learning curve for apt/dpkg etc.. I'm trying to work out how to find out what packages depend on a given package.
    You could use apt-cache for this

    To get all the packages that directly depend on a package:
    Code:
    apt-cache rdepends some_package
    The recursively get that data:

    Code:
    apt-cache rdepends --recurse some_package
    To do the reverse (get all the things that some_package depends on), just replace "rdepends" with "depends".

    Preferably at the command line; also with the option to scan either just installed packages or all available packages in the currently configured repositories.
    The above commands show anything in the repos. To limit it to just installed, just add "--installed" to either command.
    Don't try to make something "fast" until you are able to quantify "slow".

  3. #3
    Join Date
    Nov 2007
    Beans
    26

    Re: Package Dependency Queries

    Excellent, Just what I needed.

    Many thanks.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •