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, you can help support this site and get something for yourself by signing up for any of the services listed below through the provided links.

The following links are part of affiliate programs, and I will receive a referral payment from any of the services you sign-up for.

  • Get Faster Shipping: Perhaps you're about to order some stuff on 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.
  • Start Investing Now: Are you looking to start investing some of your disposable saved income? Get started by opening an account with Webull, where upon sign-up and opening a brokerage account with an initial deposit of at least $100 you will receive 1 stock valued (subject to change based on normal market movement) between $8 and $1600.

Thanks for reading and take care.