author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Mon, 29 Apr 2019 02:55:18 +0300 | |
changeset 2358 | c7a7c6b59840 |
parent 2347 | 26666adc0987 |
child 2504 | e101133a8a62 |
permissions | -rw-r--r-- |
1321
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
1 |
.. -*- coding: utf-8; -*- |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
2 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
3 |
====== |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
4 |
Apt. |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
5 |
====== |
1346
a2fbf50a43f4
Fix: Has no 'contents::' directive.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1334
diff
changeset
|
6 |
.. contents:: |
1905
fba288d59662
Include only local subsections into TOC. This prevent duplication of
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1882
diff
changeset
|
7 |
:local: |
1321
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
8 |
|
1962
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
9 |
Debian releases |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
10 |
=============== |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
11 |
|
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
12 |
Workflow:: |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
13 |
|
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
14 |
experimental → unstable (sid) → testing → stable |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
15 |
|
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
16 |
Which package from witch release:: |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
17 |
|
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
18 |
$ aptitude search ~S~i~Astable |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
19 |
$ aptitude search ~S~i~Atesting |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
20 |
$ aptitude search ~S~i~Aunstable |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
21 |
$ aptitude search ~S~i~Aexperimental |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
22 |
|
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
23 |
* https://wiki.debian.org/DebianReleases |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
24 |
* https://wiki.debian.org/DebianOldStable |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
25 |
* https://wiki.debian.org/DebianStable |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
26 |
* https://wiki.debian.org/DebianTesting |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
27 |
* https://wiki.debian.org/DebianUnstable |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
28 |
* https://wiki.debian.org/DebianExperimental |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
29 |
|
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
30 |
Conf files |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
31 |
========== |
1321
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
32 |
|
1460
59cb3aaa2fab
apt_preferences(5).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1459
diff
changeset
|
33 |
See man sources.list(5), apt.conf(5), apt_preferences(5). |
1321
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
34 |
|
1962
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
35 |
``http://httpredir.debian.org/debian/`` used for automatic balancing to nearest |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
36 |
perository. Corresponding ``/etc/apt/sources.list`` may have:: |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
37 |
|
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
38 |
deb http://httpredir.debian.org/debian/ stable main contrib non-free |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
39 |
deb http://httpredir.debian.org/debian/ stable-backports main contrib non-free |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
40 |
deb http://httpredir.debian.org/debian/ unstable main contrib non-free |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
41 |
deb http://httpredir.debian.org/debian/ experimental main contrib non-free |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
42 |
deb http://httpredir.debian.org/debian/ testing main contrib non-free |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
43 |
deb http://httpredir.debian.org/debian/ testing main contrib non-free |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
44 |
|
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
45 |
Security updates destributed via different URL (for ``oldstable``, ``stable`` |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
46 |
and ``testing`` only, of cause there are no reason for ``sid`` or |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
47 |
``experimental``):: |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
48 |
|
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
49 |
deb http://security.debian.org/ oldstable main contrib non-free |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
50 |
deb http://security.debian.org/ stable main contrib non-free |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
51 |
deb http://security.debian.org/ testing main contrib non-free |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
52 |
|
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
53 |
Other useful repositories:: |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
54 |
|
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
55 |
deb http://www.deb-multimedia.org testing main non-free |
1459
3000c0f32807
/etc/apt/preferences
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
56 |
|
2347
26666adc0987
To include config as separate file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2344
diff
changeset
|
57 |
To include config as separate file add file with name like:: |
26666adc0987
To include config as separate file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2344
diff
changeset
|
58 |
|
26666adc0987
To include config as separate file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2344
diff
changeset
|
59 |
/etc/apt/sources.list.d/*.list |
26666adc0987
To include config as separate file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2344
diff
changeset
|
60 |
|
26666adc0987
To include config as separate file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2344
diff
changeset
|
61 |
/etc/apt/sources.list.d/testing.list |
26666adc0987
To include config as separate file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2344
diff
changeset
|
62 |
/etc/apt/sources.list.d/sid.list |
26666adc0987
To include config as separate file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2344
diff
changeset
|
63 |
|
1963
1bdab6ff47be
List of useful unofficial repositories.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1962
diff
changeset
|
64 |
https://wiki.debian.org/SourcesList |
1bdab6ff47be
List of useful unofficial repositories.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1962
diff
changeset
|
65 |
About ``/etc/apt/sources.list``. |
1962
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
66 |
http://httpredir.debian.org/ |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
67 |
The redirector aims to solve the problem of choosing a Debian mirror. |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
68 |
https://www.debian.org/security/ |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
69 |
Keeping your Debian system secure. |
1963
1bdab6ff47be
List of useful unofficial repositories.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1962
diff
changeset
|
70 |
https://wiki.debian.org/UnofficialRepositories |
1bdab6ff47be
List of useful unofficial repositories.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1962
diff
changeset
|
71 |
List of useful unofficial repositories. |
1bdab6ff47be
List of useful unofficial repositories.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1962
diff
changeset
|
72 |
https://www.google.com/linuxrepositories/ |
1bdab6ff47be
List of useful unofficial repositories.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1962
diff
changeset
|
73 |
Links to Google repositories and verification key. |
1962
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
74 |
|
2323
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
75 |
Enable/disable recommends and suggestions |
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
76 |
========================================= |
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
77 |
|
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
78 |
To disable installation of recommended packages (which is by default) create file |
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
79 |
``/etc/apt/apt.conf.d/01no-recommends``:: |
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
80 |
|
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
81 |
APT::Install-Recommends "0"; |
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
82 |
APT::AutoRemove::RecommendsImportant "1"; |
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
83 |
|
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
84 |
APT::Install-Suggests "0"; |
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
85 |
|
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
86 |
Alternatively pass corresponding option to installation utility to suppress installation of |
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
87 |
recommended packages:: |
2322
237657ef1fd9
Disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1976
diff
changeset
|
88 |
|
2323
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
89 |
apt --no-install-recommends |
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
90 |
aptitude --without-recommends |
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
91 |
aptitude -R |
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
92 |
|
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
93 |
To install suggested packages:: |
2322
237657ef1fd9
Disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1976
diff
changeset
|
94 |
|
2323
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
95 |
apt --install-suggests |
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
96 |
aptitude --install-suggests |
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
97 |
|
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
98 |
Verify settings:: |
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
99 |
|
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
100 |
apt-config dump | fgrep -i recommend |
7af84df988e9
Enable/disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2322
diff
changeset
|
101 |
apt-config dump | fgrep -i suggest |
2322
237657ef1fd9
Disable recommends and suggestions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1976
diff
changeset
|
102 |
|
1962
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
103 |
Find nearest mirror |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
104 |
=================== |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
105 |
|
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
106 |
Newer approach for selecting mirror is via DNS balancing from |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
107 |
``httpredir.debian.org``. Just use:: |
1459
3000c0f32807
/etc/apt/preferences
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
108 |
|
1962
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
109 |
deb http://httpredir.debian.org/debian/ stable main contrib non-free |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
110 |
|
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
111 |
Older approach to select nearest mirrors is:: |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
112 |
|
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
113 |
$ sudo apt-get install netselect-apt |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
114 |
$ netselect-apt stable |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
115 |
$ netselect-apt testing |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
116 |
$ netselect-apt unstable |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
117 |
$ netselect-apt experimental |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
118 |
$ netselect-apt sid |
1a1e7df7015e
Find nearest mirror.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1912
diff
changeset
|
119 |
|
1976 | 120 |
Check package versions and priority |
121 |
=================================== |
|
1860 | 122 |
|
1459
3000c0f32807
/etc/apt/preferences
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
123 |
``/etc/apt/preferences``:: |
3000c0f32807
/etc/apt/preferences
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
124 |
|
3000c0f32807
/etc/apt/preferences
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
125 |
Package: * |
3000c0f32807
/etc/apt/preferences
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
126 |
Pin: release a=stable |
3000c0f32807
/etc/apt/preferences
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
127 |
Pin-Priority: 800 |
3000c0f32807
/etc/apt/preferences
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
128 |
|
3000c0f32807
/etc/apt/preferences
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
129 |
Package: * |
3000c0f32807
/etc/apt/preferences
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
130 |
Pin: release a=testing |
3000c0f32807
/etc/apt/preferences
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
131 |
Pin-Priority: 900 |
3000c0f32807
/etc/apt/preferences
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
132 |
|
3000c0f32807
/etc/apt/preferences
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
133 |
Package: * |
3000c0f32807
/etc/apt/preferences
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
134 |
Pin: release a=unstable |
3000c0f32807
/etc/apt/preferences
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
135 |
Pin-Priority: 700 |
3000c0f32807
/etc/apt/preferences
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
136 |
|
3000c0f32807
/etc/apt/preferences
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
137 |
Package: * |
3000c0f32807
/etc/apt/preferences
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
138 |
Pin: release a=experimental |
3000c0f32807
/etc/apt/preferences
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
139 |
Pin-Priority: 600 |
1321
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
140 |
|
1860 | 141 |
Example that prevent installing ``*systemd*`` packages (priority strictly below |
142 |
``0`` forbid package to be installed):: |
|
143 |
||
144 |
Package: systemd |
|
145 |
Pin: origin "" |
|
146 |
Pin-Priority: -1 |
|
147 |
||
148 |
Package: *systemd* |
|
149 |
Pin: origin "" |
|
150 |
Pin-Priority: -1 |
|
151 |
||
152 |
Example that avoid installing packages from different distribution (priority |
|
153 |
strictly below ``100`` cause a version to be installed only if there is no |
|
154 |
installed version of the package), you should keep main distribution priority |
|
155 |
above foreign distro priority:: |
|
156 |
||
157 |
Package: * |
|
158 |
Pin: release a=testing |
|
159 |
Pin-Priority: 990 |
|
160 |
||
161 |
Package: * |
|
162 |
Pin: release o=Kali |
|
163 |
Pin-Priority: 50 |
|
164 |
||
1861
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
165 |
To discover package priority:: |
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
166 |
|
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
167 |
bash# apt-cache madison emacs24 |
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
168 |
emacs24 | 24.5+1-3 | http://ftp.us.debian.org/debian/ testing/main amd64 Packages |
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
169 |
emacs24 | 24.4+1-5 | http://http.kali.org/kali/ kali-current/main amd64 Packages |
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
170 |
emacs24 | 24.5+1-3 | http://ftp.us.debian.org/debian/ testing/main Sources |
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
171 |
|
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
172 |
bash# apt-cache policy emacs24 |
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
173 |
emacs24: |
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
174 |
Installed: 24.5+1-3 |
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
175 |
Candidate: 24.5+1-3 |
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
176 |
Version table: |
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
177 |
*** 24.5+1-3 0 |
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
178 |
990 http://ftp.us.debian.org/debian/ testing/main amd64 Packages |
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
179 |
100 /var/lib/dpkg/status |
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
180 |
24.4+1-5 0 |
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
181 |
50 http://http.kali.org/kali/ kali-current/main amd64 Packages |
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
182 |
|
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
183 |
bash# aptitude versions emacs24 |
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
184 |
Package emacs24: |
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
185 |
p 24.4+1-5 kali-current 50 |
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
186 |
i 24.5+1-3 testing 990 |
c28dba308db9
Discover package priority.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1860
diff
changeset
|
187 |
|
1321
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
188 |
Setup backport. |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
189 |
=============== |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
190 |
|
1459
3000c0f32807
/etc/apt/preferences
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1346
diff
changeset
|
191 |
Main backports archive located at http://www.backports.org. |
1321
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
192 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
193 |
To get packeges gpg sign key:: |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
194 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
195 |
$ su |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
196 |
... |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
197 |
$ wget -O - http://backports.org/debian/archive.key | apt-key add - |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
198 |
$ ^D |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
199 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
200 |
Write where packeges places:: |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
201 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
202 |
$ cat /etc/apt/sources.list |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
203 |
deb http://www.backports.org/debian/ etch-backports main contrib non-free |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
204 |
|
1859
048f61a3be91
Importing package signing key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1739
diff
changeset
|
205 |
Importing package signing key. |
1321
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
206 |
============================== |
1859
048f61a3be91
Importing package signing key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1739
diff
changeset
|
207 |
|
048f61a3be91
Importing package signing key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1739
diff
changeset
|
208 |
Usualy you can safely update keyring via ``debian-keyring`` package because it |
048f61a3be91
Importing package signing key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1739
diff
changeset
|
209 |
is signed by prevoius keyring:: |
048f61a3be91
Importing package signing key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1739
diff
changeset
|
210 |
|
048f61a3be91
Importing package signing key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1739
diff
changeset
|
211 |
$ sudo apt-get install debian-keyring |
048f61a3be91
Importing package signing key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1739
diff
changeset
|
212 |
|
048f61a3be91
Importing package signing key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1739
diff
changeset
|
213 |
Defferent 3rd party provide keys for download. If you trust key (or get it in a |
048f61a3be91
Importing package signing key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1739
diff
changeset
|
214 |
trusted way) it is easy to import it:: |
048f61a3be91
Importing package signing key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1739
diff
changeset
|
215 |
|
048f61a3be91
Importing package signing key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1739
diff
changeset
|
216 |
$ sudo apt-key add $FILE.pgp |
048f61a3be91
Importing package signing key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1739
diff
changeset
|
217 |
|
048f61a3be91
Importing package signing key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1739
diff
changeset
|
218 |
Another way to resolve warning:: |
1321
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
219 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
220 |
$ sudo apt-get update |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
221 |
... |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
222 |
W: There is no public key available for the following key IDs: |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
223 |
9AA38DCD55BE302B |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
224 |
W: GPG error: http://http.us.debian.org etch Release: The following signatures |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
225 |
couldn't be verified because the public key is not available: NO_PUBKEY |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
226 |
9AA38DCD55BE302B |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
227 |
... |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
228 |
|
1859
048f61a3be91
Importing package signing key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1739
diff
changeset
|
229 |
is to use key servers directly:: |
048f61a3be91
Importing package signing key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1739
diff
changeset
|
230 |
|
1321
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
231 |
$ gpg --keyserver pgp.mit.edu --recv-key 9AA38DCD55BE302B \ |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
232 |
--keyserver-options http-proxy=http://user:pass@192.168.1.1:3128 |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
233 |
gpg: requesting key 55BE302B from hkp server pgp.mit.edu |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
234 |
gpg: key 55BE302B: public key "Debian Archive Automatic Signing Key (5.0/lenny) <ftpmaster@debian.org>" imported |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
235 |
gpg: no ultimately trusted keys found |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
236 |
gpg: Total number processed: 1 |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
237 |
gpg: imported: 1 (RSA: 1) |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
238 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
239 |
$ gpg --export 9AA38DCD55BE302B | sudo apt-key add - |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
240 |
OK |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
241 |
|
2344 | 242 |
List packages |
243 |
============= |
|
244 |
||
245 |
List all known packages:: |
|
246 |
||
247 |
apt list |
|
248 |
||
249 |
List installed packages:: |
|
250 |
||
251 |
apt list --installed |
|
252 |
||
253 |
List upgradable packages:: |
|
254 |
||
255 |
apt list --upgradable |
|
256 |
||
257 |
Install build dependency for package |
|
258 |
==================================== |
|
1321
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
259 |
:: |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
260 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
261 |
$ apt-get install build-essential # install dev LIBC and GCC C/C++ |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
262 |
$ sudo apt-get build-dep $package |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
263 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
264 |
If all you want is checking what packages are needed to build a given package:: |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
265 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
266 |
$ apt-cache showsrc $package |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
267 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
268 |
or check 'Build-Depends' attribute in:: |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
269 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
270 |
$ apt-cache show $package |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
271 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
272 |
Delete config file for removed packages. |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
273 |
======================================== |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
274 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
275 |
To get list of such packages use one of:: |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
276 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
277 |
$ aptitude search ~c |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
278 |
$ grep-status -n -sPackage -FStatus config-files |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
279 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
280 |
To remove them:: |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
281 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
282 |
$ aptitude purge ~c |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
283 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
284 |
Delete obsolete packages. |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
285 |
========================= |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
286 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
287 |
To get list of such packages use:: |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
288 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
289 |
$ aptitude search ~o |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
290 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
291 |
To remove them:: |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
292 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
293 |
$ aptitude purge ~o |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
294 |
|
1616
1559575ac211
Clean up packages cache.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1604
diff
changeset
|
295 |
To remove packages that were automatically installed to satisfy dependencies and |
1559575ac211
Clean up packages cache.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1604
diff
changeset
|
296 |
are now no longer needed:: |
1559575ac211
Clean up packages cache.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1604
diff
changeset
|
297 |
|
1559575ac211
Clean up packages cache.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1604
diff
changeset
|
298 |
$ sudo apt-get autoremove |
1559575ac211
Clean up packages cache.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1604
diff
changeset
|
299 |
|
1559575ac211
Clean up packages cache.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1604
diff
changeset
|
300 |
Clean up packages cache. |
1559575ac211
Clean up packages cache.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1604
diff
changeset
|
301 |
======================== |
1559575ac211
Clean up packages cache.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1604
diff
changeset
|
302 |
|
1559575ac211
Clean up packages cache.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1604
diff
changeset
|
303 |
Remove everything from ``/var/cache/apt/archives/`` and |
1559575ac211
Clean up packages cache.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1604
diff
changeset
|
304 |
``/var/cache/apt/archives/partial/``:: |
1559575ac211
Clean up packages cache.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1604
diff
changeset
|
305 |
|
1559575ac211
Clean up packages cache.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1604
diff
changeset
|
306 |
$ sudo apt-get clean |
1559575ac211
Clean up packages cache.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1604
diff
changeset
|
307 |
|
1559575ac211
Clean up packages cache.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1604
diff
changeset
|
308 |
Removes package files that can no longer be downloaded, and are largely |
1559575ac211
Clean up packages cache.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1604
diff
changeset
|
309 |
useless:: |
1559575ac211
Clean up packages cache.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1604
diff
changeset
|
310 |
|
1559575ac211
Clean up packages cache.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1604
diff
changeset
|
311 |
$ sudo apt-get autoclean |
1559575ac211
Clean up packages cache.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1604
diff
changeset
|
312 |
|
1321
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
313 |
Check package files for modification. |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
314 |
===================================== |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
315 |
:: |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
316 |
|
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
317 |
$ sudo debsums --changed |
baa1dd97c9e1
Delete config file for removed packages. Delete obsolete packages. Check
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
318 |
|
1604
797a3ba1f9b5
Search for packages.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1460
diff
changeset
|
319 |
Search for packages. |
797a3ba1f9b5
Search for packages.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1460
diff
changeset
|
320 |
==================== |
797a3ba1f9b5
Search for packages.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1460
diff
changeset
|
321 |
:: |
797a3ba1f9b5
Search for packages.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1460
diff
changeset
|
322 |
|
797a3ba1f9b5
Search for packages.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1460
diff
changeset
|
323 |
$ aptitude search '?tag(works-with::logfile)' |
797a3ba1f9b5
Search for packages.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1460
diff
changeset
|
324 |
|
1730
fc588b9ae857
Show dependency graph.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1716
diff
changeset
|
325 |
Show dependency graph. |
fc588b9ae857
Show dependency graph.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1716
diff
changeset
|
326 |
====================== |
fc588b9ae857
Show dependency graph.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1716
diff
changeset
|
327 |
:: |
fc588b9ae857
Show dependency graph.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1716
diff
changeset
|
328 |
|
fc588b9ae857
Show dependency graph.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1716
diff
changeset
|
329 |
$ apt-cache dotty $PKG | dot -Tsvg >$PKG.svg && see $PKG.svg |
fc588b9ae857
Show dependency graph.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1716
diff
changeset
|
330 |
|
fc588b9ae857
Show dependency graph.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1716
diff
changeset
|
331 |
$ sudo apt-get install debtree |
fc588b9ae857
Show dependency graph.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1716
diff
changeset
|
332 |
$ debtree $PKG | dot -Tsvg >$PKG.svg && see $PKG.svg |
fc588b9ae857
Show dependency graph.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1716
diff
changeset
|
333 |
|
fc588b9ae857
Show dependency graph.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1716
diff
changeset
|
334 |
$ sudo apt-get install apt-rdepends |
1732 | 335 |
$ apt-rdepends $PKG |
336 |
$ apt-rdepends -r $PKG |
|
1730
fc588b9ae857
Show dependency graph.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
1716
diff
changeset
|
337 |
$ apt-rdepends -d $PKG | dot -Tsvg >$PKG.svg && see $PKG.svg |
1732 | 338 |
$ apt-rdepends -d -r $PKG | dot -Tsvg >$PKG.svg && see $PKG.svg |
1976 | 339 |
|
340 |
Simulation mode |
|
341 |
=============== |
|
342 |
||
343 |
Simulation for ``apt-get`` and ``aptitude`` shows what happen without actually |
|
344 |
modifying or installing any packages. |
|
345 |
||
346 |
Simulate install or upgrade with ``-s`` key:: |
|
347 |
||
348 |
$ sudo apt-get install -s xterm |
|
349 |
$ sudo aptitude install -s xterm |
|
350 |
$ sudo apt-get upgrade -s |
|
351 |
$ sudo aptitude upgrade -s |
|
352 |
||
2324
a691d00452b3
Making aptitude forget changes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2323
diff
changeset
|
353 |
Making aptitude forget changes |
a691d00452b3
Making aptitude forget changes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2323
diff
changeset
|
354 |
============================== |
a691d00452b3
Making aptitude forget changes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2323
diff
changeset
|
355 |
|
a691d00452b3
Making aptitude forget changes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2323
diff
changeset
|
356 |
Following removes or override (like "hold" status) ``aptitude`` package state DB:: |
a691d00452b3
Making aptitude forget changes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2323
diff
changeset
|
357 |
|
a691d00452b3
Making aptitude forget changes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2323
diff
changeset
|
358 |
sudo rm /var/lib/aptitude/pkgstates |
a691d00452b3
Making aptitude forget changes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
2323
diff
changeset
|
359 |
sudo aptitude keep-all |