[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to 'apt-cache search'&'apt-file search' by distribut



On Sun, 2004-04-18 at 13:57, users@linuxforums.org wrote:
> 
> What arguement should I use with 'apt-cache search' and 'apt-file
> search' to specific the distribution?
> 
> Eg. If I want to search for source packages (or normal packages) in
> unstable distribution, what would the complete command for 'apt-cache
> search' and 'apt-file search'?
> 

AFAIK, you cant restrict your apt-cache search by branch. I think it
just searches all package lists fetched from the sources in your
/etc/apt/sources.list. However, if you know the package name, you can
use apt-cache policy <package name> to see a list of all available
packages (from all branches) with the specified name along with their
versions, apt-get sources, and installation status. 

david@zepto:~$ apt-cache policy mutt
mutt:
  Installed: 1.5.5.1-20040112+1
  Candidate: 1.5.5.1-20040112+1
  Version Table:
 *** 1.5.5.1-20040112+1 0
        500 ftp://ftp.debian.org sarge/main Packages
        100 /var/lib/dpkg/status
     1.3.28-2.2 0
        500 http://security.debian.org woody/updates/main Packages
        500 ftp://ftp.debian.org woody/main Packages

Also, if you know the package exists, you _can_ specify the distribution
you want to install from with apt-get --target-release <release name>
<directive> <package name>

zepto:/home/david# apt-get -s --target-release stable install tcpdump
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
  tcpdump
0 upgraded, 1 newly installed, 0 to remove and 18 not upgraded.
Inst tcpdump (3.6.2-2.8 Debian-Security:3.0/stable)
Conf tcpdump (3.6.2-2.8 Debian-Security:3.0/stable)


-davidc



Reply to: