-
Notifications
You must be signed in to change notification settings - Fork 0
/
Apt-file.mw
81 lines (59 loc) · 2.64 KB
/
Apt-file.mw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{{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 =
<code>apt-file</code> 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 <code>apt-file</code>]:
<blockquote>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.</blockquote>
= Installation =
The order in which these commands are run matter, <ref>
Also <code>apt update</code> cannot be skipped since package contents files need to be downloaded.
</ref> 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 <code>/etc/apt/apt.conf.d/30usability-misc</code>] 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 <code>apt-file</code> and <code>command-not-found</code>. <ref>
<pre>
Acquire::IndexTargets::deb::Contents-deb::DefaultEnabled false;
</pre>
breaks <code>apt-file</code> because it requires <code>/var/lib/apt/lists/*Contents*</code> to exist.
See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857090
</ref>
{{CodeSelect|code=
sudo rm -f /etc/apt/apt.conf.d/30usability-misc
}}
'''2.''' Install <code>apt-file</code>.
{{Install Package|
package=apt-file
}}
'''3.''' Run <code>apt-file update</code> with root rights.
{{CodeSelect|code=
sudo apt-file update
}}
'''4.''' Done.
Setup of <code>apt-file</code> 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|<code>command-not-found</code>]]
* [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}}