{{Header}}
{{Title|
title=apt-file
}}
{{#seo:
|description=HowTo: install apt-file. It can be used to show which files are included by a package.
|image=Aptfiles1614223640.jpg
}}
[[File:Aptfiles1614223640.jpg|thumb]]
{{intro|
HowTo: install apt-file. It can be used to show which files are included by a package.
}}
= Introduction =
apt-file can be used to show which files are included by a package.
From the Debian package description [https://packages.debian.org/{{Stable project version based on Debian codename}}/apt-file apt-file]:
search for files within Debian packages (command-line interface) apt-file is a command line tool for searching files contained in packages for the APT packaging system. You can search in which package a file is included or list the contents of a package without installing or fetching it.= Installation = The order in which these commands are run matters Also
apt update cannot be skipped since package contents files need to be downloaded.
but the process is idempotent. This means it is possible to re-apply all of the following steps.
{{Box|text=
{{IconSet|h1|1}} Delete file {{Github_link|repo=usability-misc|path=/blob/master/etc/apt/apt.conf.d/30usability-misc|text=/etc/apt/apt.conf.d/30usability-misc}}.
Because it contains settings that [https://forums.whonix.org/t/speeding-up-apt-update-with-acquire-languages-none-and-contents-deb-defaultenabled-false-its-so-much-faster/8894 speed up APT] but break apt-file and command-not-found.
Acquire::IndexTargets::deb::Contents-deb::DefaultEnabled false;This breaks
apt-file because it requires /var/lib/apt/lists/*Contents* to exist.
See: [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857090 Debian bug #857090]
{{CodeSelect|code=
sudo safe-rm -f -- /etc/apt/apt.conf.d/30usability-misc
}}
{{IconSet|h1|2}} Install apt-file.
{{Install Package|
package=apt-file
}}
{{IconSet|h1|3}} Run apt-file update with root rights.
{{CodeSelect|code=
sudo apt-file update
}}
{{IconSet|h1|4}} Done.
The setup of apt-file has been completed.
}}
= Usage =
Syntax:
{{CodeSelect|code=
sudo apt-file list package-name
}}
Example:
{{CodeSelect|code=
sudo apt-file list nano
}}
= See Also =
* [[command-not-found|command-not-found]]
* [https://forums.whonix.org/t/speeding-up-apt-update-with-acquire-languages-none-and-contents-deb-defaultenabled-false-its-so-much-faster/8894 Speeding up "apt update" with Acquire::Languages=none and Contents-deb::DefaultEnabled=false - It's so much faster!]
= Footnotes =
{{reflist|close=1}}
[[Category:Documentation]]
{{Footer}}