ThorneLabs

Find the Ubuntu Apt Package a Command Belongs To

• Updated January 10, 2019


While working on Ubuntu Server 14.04, I needed to install the innobackupex command, but simply running sudo apt-get install innobackupex did nothing. I tried running apt-cache search innobackupex, but nothing was returned. This was another case of a command belonging to an apt package that did not use the same name.

My background is with yum based Linux distributions, so I’m familiar enough with the yum command to know that yum provides */command can be used to quickly figure out what package a command belongs to.

In order to emulate the yum provides functionality in apt you need to install apt-file.

sudo apt-get install apt-file

After you have installed apt-file, you need to update its database (just like you would update apt’s database):

apt-file update

With that done, you can finally search for the package the command you are trying to install belongs to.

As previously mentioned, I needed to install innobackupex, so I ran an apt-file search:

apt-file search innobackupex

apt-file returned one result: percona-xtrabackup.

I installed the package with sudo apt-get install percona-xtrabackup and the innobackupex command was now available.

If you found this post useful and would like to help support this site - and get something for yourself - sign up for any of the services listed below through the provided affiliate links. I will receive a referral payment from any of the services you sign-up for.

Get faster shipping and more with Amazon Prime: About to order something from Amazon but want to get more value out of the money you would normally pay for shipping? Sign-up for a free 30-day trial of Amazon Prime to get free two-day shipping, access to thousands of movies and TV shows, and more.

Thanks for reading and take care.