How do I search for available packages from the command-line?
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
474
down vote
favorite
I have successfully installed some packages using the command line 'sudo apt-get install ...' when I have known in advance that those packages are available. But how can I search for or get a list of what is available in the repositories?
command-line apt
add a comment |Â
up vote
474
down vote
favorite
I have successfully installed some packages using the command line 'sudo apt-get install ...' when I have known in advance that those packages are available. But how can I search for or get a list of what is available in the repositories?
command-line apt
add a comment |Â
up vote
474
down vote
favorite
up vote
474
down vote
favorite
I have successfully installed some packages using the command line 'sudo apt-get install ...' when I have known in advance that those packages are available. But how can I search for or get a list of what is available in the repositories?
command-line apt
I have successfully installed some packages using the command line 'sudo apt-get install ...' when I have known in advance that those packages are available. But how can I search for or get a list of what is available in the repositories?
command-line apt
command-line apt
edited Jun 5 '14 at 20:15
Braiam
49.9k20130214
49.9k20130214
asked Jul 7 '12 at 18:28
Mark Thomas
2,475397
2,475397
add a comment |Â
add a comment |Â
5 Answers
5
active
oldest
votes
up vote
594
down vote
accepted
To search for a particular package by name or description:
From the command-line, use:
apt-cache search keyword
where the search keyword can be all or part of a package name or any words used in its description.
For example, apt-cache search proxy
includes both these packages:
tinyproxy - A lightweight, non-caching, optionally anonymizing HTTP proxy
tircd - ircd proxy to the twitter API
Note: the list may be long, so you can pipe the output to
less
to make it scrollable one line or one screen at a time, i.e.apt-cache search something | less
.
To get a list of ALL packages
apt-cache search .
Use Synaptic if you have X-forwarding enabled or are on a desktop
Synaptic is often a more convenient way to do this, but requires at least an X server on your end (unless you're running a desktop environment). Install with sudo apt-get install synaptic
if necessary.
Synaptic on ssh'd server via X forwarding:
Synaptic running locally on Ubuntu Desktop:
@MarkThomas Tryapt-cache policy
too, it gives you more information about the sources.
â yclian
Mar 21 '15 at 2:44
likeapt-get
, you can just runapt-cache
without any arguments and get the short help/cheatsheet info. You can always read the manpages on it for longer help. (i.e.man apt-cache
)
â pd12
Oct 28 '15 at 1:08
Supposing that I'm foolish enough to want to live the results intoapt install
, is there a smart way to do that? The output from this function is messy. One could use the first word from each line, but there should be an easier way.
â Deleet
Nov 4 '16 at 7:41
you can also search online. packages.ubuntu.com
â activedecay
Sep 8 '17 at 5:18
If you only need the names of all the packages available just doapt-cache pkgnames
â flaz14
Feb 15 at 11:15
add a comment |Â
up vote
28
down vote
Using aptitude
, apt-cache
, and apt
all format the output differently. (None of these require the use of sudo
when searching for a package.) I prefer using apt
for its readability. It highlights the package name and puts a space between the different packages. It also has [installed]
listed next to each package that is already installed. Usage:
apt search package-name
if i run say '$ apt search firefox' it produces tons of output results :(
â user3804598
Jan 2 at 17:45
You could narrow your search with something like:apt search firefox | grep -A 3 firefox
â jbrock
Apr 16 at 16:01
add a comment |Â
up vote
24
down vote
You can also use aptitude from the command line:
aptitude search xxxxxx
1
The annoying thing about this one is that Ubuntu doesn't seem to give it to you by default. Up until I learnt aboutapt-cache
, I was always having do soapt-get install aptitude
on each new box I installed. However, since I can't find a way to getapt-cache
to show me whether it's installed, I guess I'll have to keep doing that for a bit :-)
â user9184
May 5 '16 at 6:39
1
@paxdiablo Just create two line shell script (second line someting likedpkg --list | grep "$1"
) or add shell function to this effect into your.bash_login
... :-)
â FooF
Aug 12 '16 at 3:43
add a comment |Â
up vote
5
down vote
The apt-cache command line tool is used for searching apt software
package cache. In simple words, this tool is used to search software
packages, collects information of packages and also used to search for
what available packages are ready for installation on Debian or Ubuntu
based systems.
To find out the package name and with it description before installing, use the âÂÂsearchâ flag. Using âÂÂsearchâ with apt-cache will display a list of matched packages with short description. LetâÂÂs say you would like to find out description of package âÂÂvsftpdâÂÂ, then command would be.
Syntax:
apt-cache search SearchTerm
$ apt-cache search vsftpd
The possible output would be:
vsftpd - lightweight, efficient FTP server written for security
ccze - A robust, modular log coloriser
ftpd - File Transfer Protocol (FTP) server
yasat - simple stupid audit tool
To find and list down all the packages starting with âÂÂvsftpdâÂÂ, you
could use the following command.
$ apt-cache pkgnames vsftpd
You may also want to run the results through a more, or even a grep.
For instance:
apt-cache search firefox | grep plugin
add a comment |Â
up vote
3
down vote
Assuming you want to do all of this from the terminal use the following:
first I recommend you update the package index files so the list of all files in the repository you are about to create is up to date
sudo apt-get update
then use "search regex" function in apt-cache
where "regex" stands for Regular Expression and is the pattern given to search. For more info about search patterns you can look up manual regex(7) by command man 7 regex
or in English. A regex variable equal to . will suffice.
apt-cache search .
The above will give you ALL the results but it is not in any order that is particularly helpful for browsing.
So finally we can sort by dictionary order usingsort -d
and show only a page at a time usingless
.
apt-cache search . |sort -d |less
add a comment |Â
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
594
down vote
accepted
To search for a particular package by name or description:
From the command-line, use:
apt-cache search keyword
where the search keyword can be all or part of a package name or any words used in its description.
For example, apt-cache search proxy
includes both these packages:
tinyproxy - A lightweight, non-caching, optionally anonymizing HTTP proxy
tircd - ircd proxy to the twitter API
Note: the list may be long, so you can pipe the output to
less
to make it scrollable one line or one screen at a time, i.e.apt-cache search something | less
.
To get a list of ALL packages
apt-cache search .
Use Synaptic if you have X-forwarding enabled or are on a desktop
Synaptic is often a more convenient way to do this, but requires at least an X server on your end (unless you're running a desktop environment). Install with sudo apt-get install synaptic
if necessary.
Synaptic on ssh'd server via X forwarding:
Synaptic running locally on Ubuntu Desktop:
@MarkThomas Tryapt-cache policy
too, it gives you more information about the sources.
â yclian
Mar 21 '15 at 2:44
likeapt-get
, you can just runapt-cache
without any arguments and get the short help/cheatsheet info. You can always read the manpages on it for longer help. (i.e.man apt-cache
)
â pd12
Oct 28 '15 at 1:08
Supposing that I'm foolish enough to want to live the results intoapt install
, is there a smart way to do that? The output from this function is messy. One could use the first word from each line, but there should be an easier way.
â Deleet
Nov 4 '16 at 7:41
you can also search online. packages.ubuntu.com
â activedecay
Sep 8 '17 at 5:18
If you only need the names of all the packages available just doapt-cache pkgnames
â flaz14
Feb 15 at 11:15
add a comment |Â
up vote
594
down vote
accepted
To search for a particular package by name or description:
From the command-line, use:
apt-cache search keyword
where the search keyword can be all or part of a package name or any words used in its description.
For example, apt-cache search proxy
includes both these packages:
tinyproxy - A lightweight, non-caching, optionally anonymizing HTTP proxy
tircd - ircd proxy to the twitter API
Note: the list may be long, so you can pipe the output to
less
to make it scrollable one line or one screen at a time, i.e.apt-cache search something | less
.
To get a list of ALL packages
apt-cache search .
Use Synaptic if you have X-forwarding enabled or are on a desktop
Synaptic is often a more convenient way to do this, but requires at least an X server on your end (unless you're running a desktop environment). Install with sudo apt-get install synaptic
if necessary.
Synaptic on ssh'd server via X forwarding:
Synaptic running locally on Ubuntu Desktop:
@MarkThomas Tryapt-cache policy
too, it gives you more information about the sources.
â yclian
Mar 21 '15 at 2:44
likeapt-get
, you can just runapt-cache
without any arguments and get the short help/cheatsheet info. You can always read the manpages on it for longer help. (i.e.man apt-cache
)
â pd12
Oct 28 '15 at 1:08
Supposing that I'm foolish enough to want to live the results intoapt install
, is there a smart way to do that? The output from this function is messy. One could use the first word from each line, but there should be an easier way.
â Deleet
Nov 4 '16 at 7:41
you can also search online. packages.ubuntu.com
â activedecay
Sep 8 '17 at 5:18
If you only need the names of all the packages available just doapt-cache pkgnames
â flaz14
Feb 15 at 11:15
add a comment |Â
up vote
594
down vote
accepted
up vote
594
down vote
accepted
To search for a particular package by name or description:
From the command-line, use:
apt-cache search keyword
where the search keyword can be all or part of a package name or any words used in its description.
For example, apt-cache search proxy
includes both these packages:
tinyproxy - A lightweight, non-caching, optionally anonymizing HTTP proxy
tircd - ircd proxy to the twitter API
Note: the list may be long, so you can pipe the output to
less
to make it scrollable one line or one screen at a time, i.e.apt-cache search something | less
.
To get a list of ALL packages
apt-cache search .
Use Synaptic if you have X-forwarding enabled or are on a desktop
Synaptic is often a more convenient way to do this, but requires at least an X server on your end (unless you're running a desktop environment). Install with sudo apt-get install synaptic
if necessary.
Synaptic on ssh'd server via X forwarding:
Synaptic running locally on Ubuntu Desktop:
To search for a particular package by name or description:
From the command-line, use:
apt-cache search keyword
where the search keyword can be all or part of a package name or any words used in its description.
For example, apt-cache search proxy
includes both these packages:
tinyproxy - A lightweight, non-caching, optionally anonymizing HTTP proxy
tircd - ircd proxy to the twitter API
Note: the list may be long, so you can pipe the output to
less
to make it scrollable one line or one screen at a time, i.e.apt-cache search something | less
.
To get a list of ALL packages
apt-cache search .
Use Synaptic if you have X-forwarding enabled or are on a desktop
Synaptic is often a more convenient way to do this, but requires at least an X server on your end (unless you're running a desktop environment). Install with sudo apt-get install synaptic
if necessary.
Synaptic on ssh'd server via X forwarding:
Synaptic running locally on Ubuntu Desktop:
edited Jan 26 at 21:22
Communityâ¦
1
1
answered Jul 7 '12 at 18:30
ish
112k27256290
112k27256290
@MarkThomas Tryapt-cache policy
too, it gives you more information about the sources.
â yclian
Mar 21 '15 at 2:44
likeapt-get
, you can just runapt-cache
without any arguments and get the short help/cheatsheet info. You can always read the manpages on it for longer help. (i.e.man apt-cache
)
â pd12
Oct 28 '15 at 1:08
Supposing that I'm foolish enough to want to live the results intoapt install
, is there a smart way to do that? The output from this function is messy. One could use the first word from each line, but there should be an easier way.
â Deleet
Nov 4 '16 at 7:41
you can also search online. packages.ubuntu.com
â activedecay
Sep 8 '17 at 5:18
If you only need the names of all the packages available just doapt-cache pkgnames
â flaz14
Feb 15 at 11:15
add a comment |Â
@MarkThomas Tryapt-cache policy
too, it gives you more information about the sources.
â yclian
Mar 21 '15 at 2:44
likeapt-get
, you can just runapt-cache
without any arguments and get the short help/cheatsheet info. You can always read the manpages on it for longer help. (i.e.man apt-cache
)
â pd12
Oct 28 '15 at 1:08
Supposing that I'm foolish enough to want to live the results intoapt install
, is there a smart way to do that? The output from this function is messy. One could use the first word from each line, but there should be an easier way.
â Deleet
Nov 4 '16 at 7:41
you can also search online. packages.ubuntu.com
â activedecay
Sep 8 '17 at 5:18
If you only need the names of all the packages available just doapt-cache pkgnames
â flaz14
Feb 15 at 11:15
@MarkThomas Try
apt-cache policy
too, it gives you more information about the sources.â yclian
Mar 21 '15 at 2:44
@MarkThomas Try
apt-cache policy
too, it gives you more information about the sources.â yclian
Mar 21 '15 at 2:44
like
apt-get
, you can just run apt-cache
without any arguments and get the short help/cheatsheet info. You can always read the manpages on it for longer help. (i.e. man apt-cache
)â pd12
Oct 28 '15 at 1:08
like
apt-get
, you can just run apt-cache
without any arguments and get the short help/cheatsheet info. You can always read the manpages on it for longer help. (i.e. man apt-cache
)â pd12
Oct 28 '15 at 1:08
Supposing that I'm foolish enough to want to live the results into
apt install
, is there a smart way to do that? The output from this function is messy. One could use the first word from each line, but there should be an easier way.â Deleet
Nov 4 '16 at 7:41
Supposing that I'm foolish enough to want to live the results into
apt install
, is there a smart way to do that? The output from this function is messy. One could use the first word from each line, but there should be an easier way.â Deleet
Nov 4 '16 at 7:41
you can also search online. packages.ubuntu.com
â activedecay
Sep 8 '17 at 5:18
you can also search online. packages.ubuntu.com
â activedecay
Sep 8 '17 at 5:18
If you only need the names of all the packages available just do
apt-cache pkgnames
â flaz14
Feb 15 at 11:15
If you only need the names of all the packages available just do
apt-cache pkgnames
â flaz14
Feb 15 at 11:15
add a comment |Â
up vote
28
down vote
Using aptitude
, apt-cache
, and apt
all format the output differently. (None of these require the use of sudo
when searching for a package.) I prefer using apt
for its readability. It highlights the package name and puts a space between the different packages. It also has [installed]
listed next to each package that is already installed. Usage:
apt search package-name
if i run say '$ apt search firefox' it produces tons of output results :(
â user3804598
Jan 2 at 17:45
You could narrow your search with something like:apt search firefox | grep -A 3 firefox
â jbrock
Apr 16 at 16:01
add a comment |Â
up vote
28
down vote
Using aptitude
, apt-cache
, and apt
all format the output differently. (None of these require the use of sudo
when searching for a package.) I prefer using apt
for its readability. It highlights the package name and puts a space between the different packages. It also has [installed]
listed next to each package that is already installed. Usage:
apt search package-name
if i run say '$ apt search firefox' it produces tons of output results :(
â user3804598
Jan 2 at 17:45
You could narrow your search with something like:apt search firefox | grep -A 3 firefox
â jbrock
Apr 16 at 16:01
add a comment |Â
up vote
28
down vote
up vote
28
down vote
Using aptitude
, apt-cache
, and apt
all format the output differently. (None of these require the use of sudo
when searching for a package.) I prefer using apt
for its readability. It highlights the package name and puts a space between the different packages. It also has [installed]
listed next to each package that is already installed. Usage:
apt search package-name
Using aptitude
, apt-cache
, and apt
all format the output differently. (None of these require the use of sudo
when searching for a package.) I prefer using apt
for its readability. It highlights the package name and puts a space between the different packages. It also has [installed]
listed next to each package that is already installed. Usage:
apt search package-name
edited Mar 23 '17 at 20:12
answered Nov 28 '16 at 1:20
![](https://i.stack.imgur.com/hqv7Z.jpg?s=32&g=1)
![](https://i.stack.imgur.com/hqv7Z.jpg?s=32&g=1)
jbrock
1,7581126
1,7581126
if i run say '$ apt search firefox' it produces tons of output results :(
â user3804598
Jan 2 at 17:45
You could narrow your search with something like:apt search firefox | grep -A 3 firefox
â jbrock
Apr 16 at 16:01
add a comment |Â
if i run say '$ apt search firefox' it produces tons of output results :(
â user3804598
Jan 2 at 17:45
You could narrow your search with something like:apt search firefox | grep -A 3 firefox
â jbrock
Apr 16 at 16:01
if i run say '$ apt search firefox' it produces tons of output results :(
â user3804598
Jan 2 at 17:45
if i run say '$ apt search firefox' it produces tons of output results :(
â user3804598
Jan 2 at 17:45
You could narrow your search with something like:
apt search firefox | grep -A 3 firefox
â jbrock
Apr 16 at 16:01
You could narrow your search with something like:
apt search firefox | grep -A 3 firefox
â jbrock
Apr 16 at 16:01
add a comment |Â
up vote
24
down vote
You can also use aptitude from the command line:
aptitude search xxxxxx
1
The annoying thing about this one is that Ubuntu doesn't seem to give it to you by default. Up until I learnt aboutapt-cache
, I was always having do soapt-get install aptitude
on each new box I installed. However, since I can't find a way to getapt-cache
to show me whether it's installed, I guess I'll have to keep doing that for a bit :-)
â user9184
May 5 '16 at 6:39
1
@paxdiablo Just create two line shell script (second line someting likedpkg --list | grep "$1"
) or add shell function to this effect into your.bash_login
... :-)
â FooF
Aug 12 '16 at 3:43
add a comment |Â
up vote
24
down vote
You can also use aptitude from the command line:
aptitude search xxxxxx
1
The annoying thing about this one is that Ubuntu doesn't seem to give it to you by default. Up until I learnt aboutapt-cache
, I was always having do soapt-get install aptitude
on each new box I installed. However, since I can't find a way to getapt-cache
to show me whether it's installed, I guess I'll have to keep doing that for a bit :-)
â user9184
May 5 '16 at 6:39
1
@paxdiablo Just create two line shell script (second line someting likedpkg --list | grep "$1"
) or add shell function to this effect into your.bash_login
... :-)
â FooF
Aug 12 '16 at 3:43
add a comment |Â
up vote
24
down vote
up vote
24
down vote
You can also use aptitude from the command line:
aptitude search xxxxxx
You can also use aptitude from the command line:
aptitude search xxxxxx
edited Apr 11 '17 at 18:04
![](https://i.stack.imgur.com/Ogq0T.png?s=32&g=1)
![](https://i.stack.imgur.com/Ogq0T.png?s=32&g=1)
Drew Dormann
1116
1116
answered Dec 21 '14 at 23:43
lxx
34147
34147
1
The annoying thing about this one is that Ubuntu doesn't seem to give it to you by default. Up until I learnt aboutapt-cache
, I was always having do soapt-get install aptitude
on each new box I installed. However, since I can't find a way to getapt-cache
to show me whether it's installed, I guess I'll have to keep doing that for a bit :-)
â user9184
May 5 '16 at 6:39
1
@paxdiablo Just create two line shell script (second line someting likedpkg --list | grep "$1"
) or add shell function to this effect into your.bash_login
... :-)
â FooF
Aug 12 '16 at 3:43
add a comment |Â
1
The annoying thing about this one is that Ubuntu doesn't seem to give it to you by default. Up until I learnt aboutapt-cache
, I was always having do soapt-get install aptitude
on each new box I installed. However, since I can't find a way to getapt-cache
to show me whether it's installed, I guess I'll have to keep doing that for a bit :-)
â user9184
May 5 '16 at 6:39
1
@paxdiablo Just create two line shell script (second line someting likedpkg --list | grep "$1"
) or add shell function to this effect into your.bash_login
... :-)
â FooF
Aug 12 '16 at 3:43
1
1
The annoying thing about this one is that Ubuntu doesn't seem to give it to you by default. Up until I learnt about
apt-cache
, I was always having do so apt-get install aptitude
on each new box I installed. However, since I can't find a way to get apt-cache
to show me whether it's installed, I guess I'll have to keep doing that for a bit :-)â user9184
May 5 '16 at 6:39
The annoying thing about this one is that Ubuntu doesn't seem to give it to you by default. Up until I learnt about
apt-cache
, I was always having do so apt-get install aptitude
on each new box I installed. However, since I can't find a way to get apt-cache
to show me whether it's installed, I guess I'll have to keep doing that for a bit :-)â user9184
May 5 '16 at 6:39
1
1
@paxdiablo Just create two line shell script (second line someting like
dpkg --list | grep "$1"
) or add shell function to this effect into your .bash_login
... :-)â FooF
Aug 12 '16 at 3:43
@paxdiablo Just create two line shell script (second line someting like
dpkg --list | grep "$1"
) or add shell function to this effect into your .bash_login
... :-)â FooF
Aug 12 '16 at 3:43
add a comment |Â
up vote
5
down vote
The apt-cache command line tool is used for searching apt software
package cache. In simple words, this tool is used to search software
packages, collects information of packages and also used to search for
what available packages are ready for installation on Debian or Ubuntu
based systems.
To find out the package name and with it description before installing, use the âÂÂsearchâ flag. Using âÂÂsearchâ with apt-cache will display a list of matched packages with short description. LetâÂÂs say you would like to find out description of package âÂÂvsftpdâÂÂ, then command would be.
Syntax:
apt-cache search SearchTerm
$ apt-cache search vsftpd
The possible output would be:
vsftpd - lightweight, efficient FTP server written for security
ccze - A robust, modular log coloriser
ftpd - File Transfer Protocol (FTP) server
yasat - simple stupid audit tool
To find and list down all the packages starting with âÂÂvsftpdâÂÂ, you
could use the following command.
$ apt-cache pkgnames vsftpd
You may also want to run the results through a more, or even a grep.
For instance:
apt-cache search firefox | grep plugin
add a comment |Â
up vote
5
down vote
The apt-cache command line tool is used for searching apt software
package cache. In simple words, this tool is used to search software
packages, collects information of packages and also used to search for
what available packages are ready for installation on Debian or Ubuntu
based systems.
To find out the package name and with it description before installing, use the âÂÂsearchâ flag. Using âÂÂsearchâ with apt-cache will display a list of matched packages with short description. LetâÂÂs say you would like to find out description of package âÂÂvsftpdâÂÂ, then command would be.
Syntax:
apt-cache search SearchTerm
$ apt-cache search vsftpd
The possible output would be:
vsftpd - lightweight, efficient FTP server written for security
ccze - A robust, modular log coloriser
ftpd - File Transfer Protocol (FTP) server
yasat - simple stupid audit tool
To find and list down all the packages starting with âÂÂvsftpdâÂÂ, you
could use the following command.
$ apt-cache pkgnames vsftpd
You may also want to run the results through a more, or even a grep.
For instance:
apt-cache search firefox | grep plugin
add a comment |Â
up vote
5
down vote
up vote
5
down vote
The apt-cache command line tool is used for searching apt software
package cache. In simple words, this tool is used to search software
packages, collects information of packages and also used to search for
what available packages are ready for installation on Debian or Ubuntu
based systems.
To find out the package name and with it description before installing, use the âÂÂsearchâ flag. Using âÂÂsearchâ with apt-cache will display a list of matched packages with short description. LetâÂÂs say you would like to find out description of package âÂÂvsftpdâÂÂ, then command would be.
Syntax:
apt-cache search SearchTerm
$ apt-cache search vsftpd
The possible output would be:
vsftpd - lightweight, efficient FTP server written for security
ccze - A robust, modular log coloriser
ftpd - File Transfer Protocol (FTP) server
yasat - simple stupid audit tool
To find and list down all the packages starting with âÂÂvsftpdâÂÂ, you
could use the following command.
$ apt-cache pkgnames vsftpd
You may also want to run the results through a more, or even a grep.
For instance:
apt-cache search firefox | grep plugin
The apt-cache command line tool is used for searching apt software
package cache. In simple words, this tool is used to search software
packages, collects information of packages and also used to search for
what available packages are ready for installation on Debian or Ubuntu
based systems.
To find out the package name and with it description before installing, use the âÂÂsearchâ flag. Using âÂÂsearchâ with apt-cache will display a list of matched packages with short description. LetâÂÂs say you would like to find out description of package âÂÂvsftpdâÂÂ, then command would be.
Syntax:
apt-cache search SearchTerm
$ apt-cache search vsftpd
The possible output would be:
vsftpd - lightweight, efficient FTP server written for security
ccze - A robust, modular log coloriser
ftpd - File Transfer Protocol (FTP) server
yasat - simple stupid audit tool
To find and list down all the packages starting with âÂÂvsftpdâÂÂ, you
could use the following command.
$ apt-cache pkgnames vsftpd
You may also want to run the results through a more, or even a grep.
For instance:
apt-cache search firefox | grep plugin
answered Sep 10 '16 at 12:27
![](https://i.stack.imgur.com/kFRTx.png?s=32&g=1)
![](https://i.stack.imgur.com/kFRTx.png?s=32&g=1)
U.Swap
15114
15114
add a comment |Â
add a comment |Â
up vote
3
down vote
Assuming you want to do all of this from the terminal use the following:
first I recommend you update the package index files so the list of all files in the repository you are about to create is up to date
sudo apt-get update
then use "search regex" function in apt-cache
where "regex" stands for Regular Expression and is the pattern given to search. For more info about search patterns you can look up manual regex(7) by command man 7 regex
or in English. A regex variable equal to . will suffice.
apt-cache search .
The above will give you ALL the results but it is not in any order that is particularly helpful for browsing.
So finally we can sort by dictionary order usingsort -d
and show only a page at a time usingless
.
apt-cache search . |sort -d |less
add a comment |Â
up vote
3
down vote
Assuming you want to do all of this from the terminal use the following:
first I recommend you update the package index files so the list of all files in the repository you are about to create is up to date
sudo apt-get update
then use "search regex" function in apt-cache
where "regex" stands for Regular Expression and is the pattern given to search. For more info about search patterns you can look up manual regex(7) by command man 7 regex
or in English. A regex variable equal to . will suffice.
apt-cache search .
The above will give you ALL the results but it is not in any order that is particularly helpful for browsing.
So finally we can sort by dictionary order usingsort -d
and show only a page at a time usingless
.
apt-cache search . |sort -d |less
add a comment |Â
up vote
3
down vote
up vote
3
down vote
Assuming you want to do all of this from the terminal use the following:
first I recommend you update the package index files so the list of all files in the repository you are about to create is up to date
sudo apt-get update
then use "search regex" function in apt-cache
where "regex" stands for Regular Expression and is the pattern given to search. For more info about search patterns you can look up manual regex(7) by command man 7 regex
or in English. A regex variable equal to . will suffice.
apt-cache search .
The above will give you ALL the results but it is not in any order that is particularly helpful for browsing.
So finally we can sort by dictionary order usingsort -d
and show only a page at a time usingless
.
apt-cache search . |sort -d |less
Assuming you want to do all of this from the terminal use the following:
first I recommend you update the package index files so the list of all files in the repository you are about to create is up to date
sudo apt-get update
then use "search regex" function in apt-cache
where "regex" stands for Regular Expression and is the pattern given to search. For more info about search patterns you can look up manual regex(7) by command man 7 regex
or in English. A regex variable equal to . will suffice.
apt-cache search .
The above will give you ALL the results but it is not in any order that is particularly helpful for browsing.
So finally we can sort by dictionary order usingsort -d
and show only a page at a time usingless
.
apt-cache search . |sort -d |less
edited Jan 26 '17 at 19:18
answered Dec 20 '16 at 19:46
brother_bilo
313
313
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f160897%2fhow-do-i-search-for-available-packages-from-the-command-line%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password