-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathApt-file.mw
More file actions
85 lines (62 loc) · 2.68 KB
/
Copy pathApt-file.mw
File metadata and controls
85 lines (62 loc) · 2.68 KB
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
82
83
84
85
{{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 =
<code>apt-file</code> 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 <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 matters <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=
{{IconSet|h1|1}} Delete file {{Github_link|
https://github.com/Kicksecure/usability-misc/blob/master/etc/apt/apt.conf.d/30usability-misc
}}. <ref>
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>.
<pre>
Acquire::IndexTargets::deb::Contents-deb::DefaultEnabled false;
</pre>
This 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 Debian bug #857090]
</ref>
{{CodeSelect|code=
sudo safe-rm -f -- /etc/apt/apt.conf.d/30usability-misc
}}
{{IconSet|h1|2}} Install <code>apt-file</code>.
{{Install Package|
package=apt-file
}}
{{IconSet|h1|3}} Run <code>apt-file update</code> with root rights.
{{CodeSelect|code=
sudo apt-file update
}}
{{IconSet|h1|4}} Done.
The 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 =
<references />
[[Category:Documentation]]
{{Footer}}