Results 1 to 10 of 16

Thread: apt-get find?

Hybrid View

  1. #1
    Join Date
    Jun 2008
    Location
    UK
    Beans
    282
    Distro
    Xubuntu 16.04 Xenial Xerus

    apt-get find?

    I'm normally a Kubuntu user and use adept for my package installation. One of the reasons for using this is the ability to find a package simply by typing all or part of the name into a search box. Unfortunately with KDE 4 adept is a dead duck - no longer so easy to use, and development has terminated, to boot. So as I normally use the command line for most things I think it's about time I got to grips with apt-get ... except there doesn't seem to be a way of saying "list all packages"; "list all installed packages"; "list all packages where the name or description match this".

    Is there an option to apt-get to get this functionality? Or a sister-application to get this info? Alternatively where is the information kept so I could just list the information manually? E.g. "grep -i package /path/to/list"

    Yes, I've read the fine manual page, and I've read the /usr/share/doc/ documentation and I'm still non-the-wiser.

    Andrew

  2. #2
    Join Date
    Jan 2008
    Beans
    1,336

    Re: apt-get find?

    In debian I always search with aptitude and install/remove with apt-get

  3. #3
    Join Date
    Sep 2007
    Location
    England
    Beans
    1,103

    Re: apt-get find?

    apt-cache search foo

  4. #4
    Join Date
    Jul 2006
    Location
    Here
    Beans
    11,187

    Re: apt-get find?

    "apt-cache search " is to search

    "dpkg -l | grep " is used to check if its installed


    set yourself some alias's of the commands.
    here's mine:

    Code:
    alias !='sudo'
    alias u='sudo upgrade-system'
    alias i='sudo apt-get install --no-install-recommends'
    alias r='sudo apt-get remove --purge'
    alias s='apt-cache search'
    alias ?='dpkg -l | grep'
    alias ch='clear;rm -f ~/.bash_history;history -c'
    ps: "upgrade-system" is a package: sudo apt-get install upgrade-system
    Last edited by kerry_s; October 1st, 2009 at 10:59 AM.

  5. #5
    Join Date
    Nov 2005
    Location
    NEK Vermont
    Beans
    Hidden!
    Distro
    Ubuntu UNR

    Re: apt-get find?

    also
    Code:
    dpkg --get-selections
    or write to a file in your home:
    Code:
    dpkg --get-selections > package-list

  6. #6
    Join Date
    Jun 2008
    Location
    UK
    Beans
    282
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: apt-get find?

    Thanks - this is the sort of thing I was looking for. Apt-cache looks like the app to find all packages, installed or not. But I couldn't find a way to list the full description of a non-installed application. It's late - I'll sleep on it.

    Andrew

  7. #7
    Join Date
    Jul 2006
    Location
    Here
    Beans
    11,187

  8. #8
    Join Date
    Dec 2007
    Location
    Idaho
    Beans
    4,976
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: apt-get find?

    just fyi no need to use sudo with apt-cache search, it can be done as a regular user.
    "You can't expect to hold supreme executive power just because some watery tart lobbed a sword at you"

    "Don't let your mind wander -- it's too little to be let out alone."

  9. #9
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: apt-get find?

    Quote Originally Posted by apmcd47 View Post
    Thanks - this is the sort of thing I was looking for. Apt-cache looks like the app to find all packages, installed or not. But I couldn't find a way to list the full description of a non-installed application. It's late - I'll sleep on it.

    Andrew
    apt-cache show foo

  10. #10
    Join Date
    Jun 2008
    Location
    UK
    Beans
    282
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: apt-get find?

    Quote Originally Posted by oldos2er View Post
    apt-cache show foo
    Didn't work for a non-installed package for me last night (aptitude show did).

    Just checked again now for a different package and it displayed the information. Odd.

    I shall have to have a play, take notes, read the docs I can find and possibly write my own wrappers.

    Thanks, all.

    Andrew

Tags for this Thread

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
  •