apt-file

From Kicksecure
Jump to navigation Jump to search

HowTo: install apt-file. It an be used to show which files are being included by a package.

Introduction[edit]

apt-file an be used to show which files are being included by a package.

Quote Debian package apt-filearchive.org:

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[edit]

The order in which these commands are run matter, [1] but the process is idempotent. This means it is possible to re-apply all of the following steps.

1. Delete /etc/apt/apt.conf.d/30usability-miscarchive.org because it contains settings that speed up APTarchive.org but break apt-file and command-not-found. [2]

sudo rm -f /etc/apt/apt.conf.d/30usability-misc

2. Install apt-file.

Install package(s) apt-file. Follow steps A to E.

A Platform specific notice.

B Update the package lists and upgrade the system The Web Archive Onion Version .

sudo apt update && sudo apt full-upgrade

C Install the apt-file package(s).

Using apt command line --no-install-recommends option The Web Archive Onion Version is in most cases optional.

sudo apt install --no-install-recommends apt-file

D Platform specific notice.

E Done.

The procedure of installing package(s) apt-file is complete.

3. Run apt-file update with root rights.

sudo apt-file update

4. Done.

Setup of apt-file has been completed.

Usage[edit]

Syntax:

sudo apt-file list package-name

Example:

sudo apt-file list nano

See Also[edit]

Footnotes[edit]

  1. Also apt update cannot be skipped since package contents files need to be downloaded.
  2. 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=857090archive.org

We believe security software like Kicksecure needs to remain Open Source and independent. Would you help sustain and grow the project? Learn more about our 12 year success story and maybe DONATE!