{{Header}}
{{Title|
title=apt-file
}}
{{#seo:
|description=HowTo: install apt-file. It an be used to show which files are being included by a package.
|image=Aptfiles1614223640.jpg
}}
[[File:Aptfiles1614223640.jpg|thumb]]
{{intro|
HowTo: install apt-file. It an be used to show which files are being included by a package.
}}
= Introduction =
apt-file
an be used to show which files are being included by a package.
Quote Debian package [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 matter, 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=
'''1.''' Delete [https://github.com/Whonix/usability-misc/blob/master/etc/apt/apt.conf.d/30usability-misc /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;breaks
apt-file
because it requires /var/lib/apt/lists/*Contents*
to exist.
See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857090
{{CodeSelect|code=
sudo rm -f /etc/apt/apt.conf.d/30usability-misc
}}
'''2.''' Install apt-file
.
{{Install Package|
package=apt-file
}}
'''3.''' Run apt-file update
with root rights.
{{CodeSelect|code=
sudo apt-file update
}}
'''4.''' Done.
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}}