How to install ack

The current stable version of ack is version 2.18, released March 24, 2017.

What's changed in ack? See the ack changelog.

Ack is highly portable, and will run on any machine running Perl 5.8.8 or higher.

Install ack via Perl CPAN module

If you use Perl regularly, you can install ack's module, App::Ack.

Installing via CPAN shell means that the shell can automatically tell you when ack has updates. The CPAN is also the primary distribution channel for ack. All packages below derive from here.

Install the ack executable

The single-file version of ack is a single Perl program, around 5,400 lines of plain text. It combines the ack program and all its Perl modules into a single text file you can download and install anywhere you can put a shell script. If you don't have sysadmin rights on your machine, or don't want to mess with setting up the CPAN system, this is the way to go.

# NOTE: This URL is https, not http as it was pre-2017.
curl > ~/bin/ack && chmod 0755 ~/bin/ack

Is your curl install not working? Please check that your are using the https scheme, not http. This site switched to HTTPS in early 2017. Also, make sure you are not fetching an out-of-date version. ack versions 2.00 - 2.10 have been removed from this site because they have a security vulnerability.

Install a package for your specific OS

ack has been repackaged for most Linux distributions and OS X. On Debian-derived distributions, it is called "ack-grep" because "ack" was already a package for Kanji translation.

Please note that the maintainers of ack have nothing to do with these packages. If a given package is out of date or doesn't work, you'll need to work with the packagers, not the ack team.


Package "ack"
Formula "ack"
Port "perl/p5-app-ack"


App "ack"


FreeBSD port
Port "textproc/p5-ack"
OpenBSD port
Package "p5-ack"


Package "community/ack"
Package "ack" in EPEL repository
Package "ack-grep"
(To rename the "ack-grep" program to its proper name "ack", see the section below on renaming ack-grep)
Package "ack"
Package "sys-apps/ack"
Package "perl-ack"
Package "sys-apps/ack"
Package "ack-grep"

Renaming ack-grep on Debian-derived distros

This section probably won't be necessary as latest releases of "ack-grep" package provide both "ack" and "ack-grep" commands. If for some reason the package you're using installs ack as ack-grep, here's what to do.

On Debian-derived distros, ack is packaged as "ack-grep" because "ack" already existed. If you simply install via:

$ sudo apt-get install ack-grep

your ack will be called "ack-grep", which is 167% more characters to type per invocation. This is tragic for your poor fingers.

To create a local diversion, renaming ack-grep to ack, first install the ack-grep package as shown above. Then, run:

$ sudo dpkg-divert --local --divert /usr/bin/ack --rename --add /usr/bin/ack-grep

Is there another distro we should list? Let me know at

ack 1.x

Ack has been around for years, but on April 17th, 2013 ack 2.0 was released. If you're still running ack 1.x, we urge you to upgrade to 2.0.

Although ack 1.x is no longer being maintained, and there will be no new releases, you can still download the ack 1.96 single-file distribution.

curl > ~/bin/ack && chmod 0755 !#:3

We still have the ack 1.96 manual.