-
Notifications
You must be signed in to change notification settings - Fork 0
/
Debian_Packages.mw
285 lines (198 loc) · 13.2 KB
/
Debian_Packages.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
{{Header}}
{{#seo:
|description=Which {{project_name_long}} Debian packages are safe to remove? What is a meta package? What other packages do {{project_name_long}} meta packages install? Which packages should never be removed?
|image=Box-158523640.png
}}
[[File:Box-158523640.png|thumb]]
{{intro|
Which {{project_name_short}} Debian packages are safe to remove? What is a meta package? What other packages do {{project_name_short}} meta packages install? Which packages should never be removed?
}}
= Introduction =
It is safe to run <code>sudo apt autoremove</code> so long as the specific {{project_name_short}} machine <code>meta package</code> is kept for the {{non_q_project_name_short}} or {{q_project_name_short}} platform. In other words, these packages should <u>not</u> be in the list of autoremoved packages.
[[About|{{project_name_short}}]]:
* {{project_name_workstation_long}} Xfce: <code>kicksecure-xfce</code>
* {{project_name_workstation_short}} CLI: <code>kicksecure-cli</code>
[[Qubes|{{q_project_name_long}}]]:
* {{q_project_name_short}} GUI: <code>kicksecure-qubes-gui</code>
* {{q_project_name_short}} CLI <code>kicksecure-qubes-cli</code>
Derivatives such as [https://www.whonix.org {{Whonix}}] which are based on {{Kicksecure}}:
* See [https://www.whonix.org/wiki/Debian_Packages derivative ({{Whonix}}) specific documentation] instead of this wiki page. <ref>
Because derivatives of {{project_name_short}} install additional meta packages.
</ref>
It is actually a good idea to safely run <code>sudo apt autoremove</code> according to the following instructions on this wiki page to make sure extraneous packages which might no longer be recommended for default installation are removed.
= Re-install Meta Packages and Safely Run Autoremove =
{{Box|text=
'''1.''' [[Update]] the package lists.
{{CodeSelect|code=
sudo apt update
}}
'''2.''' Ensure a proper meta package is installed.
Select your platform.
* [[{{non_q_project_name_short}}|{{non_q_project_name_short}}]] Xfce: {{CodeSelect|code=
sudo apt install kicksecure-xfce
}}
* [[{{non_q_project_name_short}}|{{non_q_project_name_short}}]] CLI: {{CodeSelect|code=
sudo apt install kicksecure-cli
}}
* [[{{Q project name short}}]]: {{CodeSelect|code=
sudo apt install kicksecure-qubes-gui
}}
'''3.''' Auto remove packages.
{{CodeSelect|code=
sudo apt autoremove
}}
'''4.''' Reconfirm a proper meta package is still installed.
Repeat step two.
'''5.''' Done.
The procedure of safely running <code>sudo apt autoremove</code> is complete.
Related: [[Factory Reset|{{project_name_short}} Factory Reset]]
}}
= Changed Configuration Files =
Be careful if a message like this appears.
<pre>
Configuration file '/etc/apparmor.d/usr.bin.sdwdate'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** usr.bin.sdwdate (Y/I/N/O/D/Z) [default=N] ?
</pre>
For general advice, see: [[Operating_System_Software_and_Updates#Changed_Configuration_Files|Changed Configuration Files]].
= Package Version Check =
If you need to check your package version, use <code>dpkg -l package-name</code> where package-name is the package you wish to check.
{{CodeSelect|code=
dpkg -l package-name
}}
Your output should look like this:
<pre>
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-===================================
ii grep 3.8-5 amd64 GNU grep, egrep and fgrep
ii package-name 0.1 amd64 package-description
</pre>
If you wish to independently verify the version, you can either access the github of a package and check its changelog.
See list of github repositories.
* https://github.com/{{project_name_short}}
* https://github.com/{{whonix}}
Go to a github repository. Example github repository:
https://github.com/{{project_name_short}}/sdwdate
Click on the <code>debian</code> sub folder.
Click on the <code>changelog</code> file. Example <code>/debian/changelog</code> file:
https://github.com/{{project_name_short}}/sdwdate/blob/master/debian/changelog
On the very top of the changelog is the latest version number.
TODO: document how to view the version number using deb.kicksecure.com / deb.whonix.org
related: [[Reporting_Bugs#Package_Upgrade_Policy|Package Upgrade Policy]]
= Advanced Topics =
{{Anchor|Disadvantage}}
== Packages FAQ ==
'''Table:''' ''Meta-packages Frequently Asked Questionss''
{| class="wikitable"
|-
! scope="col"| '''Question'''
! scope="col"| '''Answer'''
|-
! scope="row"| What is the disadvantage of removing a meta package?
| The disadvantage is any changes in package dependencies will not be automatically processed by the system when it is [[Security_Guide#Updates|upgraded]].
For example the <code>kicksecure-packages-recommended-gui</code> meta package depends <ref>
<code>Depends:</code> field in <code>debian/control</code>
</ref> on package <code>[https://github.com/{{project_name_short}}/tb-updater tb-updater]</code>. If the <code>kicksecure-packages-recommended-gui</code> package is not installed, you would not notice if <code>tb-updater</code> was [https://phabricator.whonix.org/T18 replaced] with package [https://packages.debian.org/torbrowser-launcher <code>torbrowser-launcher</code>]. <code>tb-updater</code> might become unmaintained, broken or even have unfixed security issues. {{project_name_short}} tries to [[Stay Tuned|keep users up-to-date]] if/when (security relevant) packages are deprecated. If that occurs, you could simply run <code>sudo apt purge tb-updater</code> and consider installing what the {{project_name_short}} meta package recommends as a replacement.
See also: [[#Technical_Information|Technical Information]].
{{Anchor|Which ones are safe to remove?}}
|-
! scope="row"| Which meta packages are safe to remove?
| Use apt-cache to see the package description.
* Replace <code>package-name</code> with the package you intend to install.
{{CodeSelect|code=
apt-cache package-name
}}
It will include either:
* <code>Safe to remove, if you know what you are doing.</code>; or
* <code>Do not remove.</code>
Note the [[#Removal Instructions|Removal Instructions]] below! When that entry is understood, feel free to remove any [[#Non-Issues|desktop specific meta packages]].
|-
! scope="row"| Which packages do {{project_name_short}} meta packages install?
| Refer to the following files:
* [https://github.com/{{project_name_short}}/kicksecure-meta-packages/blob/master/debian/control <code>debian/control</code>] in {{project_name_short}} [https://github.com/{{project_name_short}}/kicksecure-meta-packages <code>kicksecure-meta-packages</code>] source code folder; and
* [https://github.com/{{project_name_short}}/kicksecure-meta-packages/blob/master/debian/control <code>debian/control</code>] in {{project_name_short}} [https://github.com/{{project_name_short}}/kicksecure-meta-packages <code>kicksecure-meta-packages</code>] source code folder.
Or use for example.
{{CodeSelect|code=
apt-cache show kicksecure-packages-recommended-gui
}}
{{Anchor|Which packages should never be removed?}}
|-
! scope="row"| Which meta packages should never be removed?
| Do not remove any packages which include the name <code>dependencies</code>, unless the implications are fully understood.
TODO: document
|-
! scope="row"| How to uninstall <code>qubes-core-agent-passwordless-root</code> without also uninstalling <code>kicksecure-qubes-gui</code> or <code>kicksecure-qubes-cli</code>?
|
{{CodeSelect|code=
dummy-dependency --purge qubes-core-agent-passwordless-root
}}
|-
|}
== dummy-dependency ==
<code>dummy-dependency</code> <ref>
https://github.com/Kicksecure/helper-scripts/blob/master/usr/bin/dummy-dependency
</ref> ([https://github.com/Kicksecure/helper-scripts/blob/master/man/dummy-dependency.8.ronn man page]) can be used to install a dummy dependency package in place of a real dependency package. This allows the uninstallation of packages that are normally not uninstallable, without removing a (meta) package that depends on the original package.
== Removal Instructions ==
'''Syntax.'''
<u>Notes:</u>
* Optional: <code>--purge</code>. Same as <code>apt-get purge</code>.
* Optional: <code>--yes</code>. Does not ask for confirmation.
{{CodeSelect|code=
sudo dummy-dependency --yes --purge package-name
}}
'''Example.'''
<u>Note:</u> Replace <code>user-sysmaint-split</code> with the actual package you want to remove.
* Replace <code>user-sysmaint-split</code> with the actual package you want to remove.
* Optional: <code>--purge</code>. Same as <code>apt-get purge</code>.
* Optional: <code>--yes</code>. Does not ask for confirmation.
{{CodeSelect|code=
sudo dummy-dependency --yes --purge user-sysmaint-split
}}
forum topic: [https://forums.whonix.org/t/issues-with-removal-of-specific-packages-by-users-builders/653/9 Issues with removal of specific packages by users / builders].
== Technical Information ==
{{mbox
| type = notice
| image = [[File:Ambox_notice.png|40px|alt=Info]]
| text = This section provides technical information for interested readers and can be skipped.
}}
The underlying technical issues with meta packages are not caused by {{project_name_short}}, but instead have been inherited from Debian. Those are also described here:
* [https://administratosphere.wordpress.com/2011/11/29/the-metapackage-problem-and-apt-get-autoremove/ The Metapackage Problem and apt autoremove]
* [https://tanguy.ortolo.eu/blog/article8/uninstall-meta-package Uninstalling a single component of a meta-package]
* [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=942303 Debian bug report: Weak-Depends - something in the middle between 'Recommends:' and 'Depends:']
* [https://lists.debian.org/debian-devel/2024/11/msg00018.html RFC: "Recommended bloat", and how to possibly fix it]
* [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1086801 apt: autoremove fails to remove garbage packages with unrelated Suggests links]
The Debian manual also provides further information about meta packages:
* [https://www.debian.org/doc/manuals/developers-reference/best-pkging-practices.html#bpp-meta Best practices for meta-packages]
The {{project_name_short}} build script installs all packages using <code>apt --no-install-recommends</code>. <ref>
Function <code>pkg-install-maybe</code> in https://github.com/{{project_name_short}}/derivative-maker/blob/master/build-steps.d/3500_install-packages#L96C17.
</ref> The <code>--no-install-recommends</code> option is being used to prevent installation of many additional packages that are unwanted. For example:
* <code>kicksecure-packages-recommended-gui</code> (used to) <code>Depends: gwenview</code>.
* gwenview <code>Recommends: kamera</code>.
* Without using <code>--no-install-recommends</code>, <code>kamera</code> would also be installed and then pull its own <code>Depends:</code> as well.
* <code>kamera</code> [+ dependencies] would not be useful to have installed by default on {{project_name_workstation_short}} as it would cost unnecessary disk space. There are many more examples which could end up installing packages by default that are unrecommended for privacy reasons.
Since the <code>--no-install-recommends</code> option is used, meta packages like <code>kicksecure-packages-recommended-gui</code> must use the <code>Depends:</code> field and cannot use the <code>Recommends:</code> field. (Since no packages would be installed then.)
Even if {{project_name_short}} could and did use the <code>Recommends:</code> field, new packages added to the <code>Recommends:</code> field would not be installed when the meta package that <code>Recommends:</code> them gets upgraded. This is because packages listed after the <code>Recommends:</code> field only get installed during their initial <code>sudo apt install package-name</code> installation.
Some readers might notice that despite this explanation, <code>kicksecure-meta-packages</code>'s <code>debian/control</code> file uses the <code>Recommends:</code> field anyway. This is not a contradiction because it may be useful for a later [[Dev/Installation_from_Repository|{{project_name_short}} installation from {{project_name_short}} repository]] use case.
Forum discussion:<br />
[https://forums.whonix.org/t/issues-with-removal-of-specific-packages-by-users-builders Issues with removal of specific packages by users / builders]
= See Also =
* [[Configuration_Files#Configuration_Drop-In_Folders|Configuration Drop-In Folders]]
* [[Configuration_Files#Reset_Configuration_Files_to_Vendor_Default|Reset Configuration Files to Vendor Default]]
* [[Factory Reset|{{project_name_short}} Factory Reset]]
* [[Packages for Debian Hosts]]
* [[Project-APT-Repository|{{project_name_short}} APT Repository]]
* [[Dev/Build Documentation|Building and Update {{project_name_short}} from Source Code]]
= Footnotes =
{{reflist|close=1}}
{{Footer}}
[[Category:Documentation]]