Page MenuHomePhabricator

Avoid indefinite growing of apt caches and old kernel images
Closed, ResolvedPublic

Description

Instance cvn-apache8 was created in April 2015 from a standard Ubuntu image.

No modifications have been made. It should be as plain as the vast majority of labs instances out there I imagine.

This morning I noticed the root partition ducked under 15G of free space. There is nothing that I set up on the instance that uses the root partition.

I ran apt-get clean and apt-get purge followed by apt-get autoremove.

1root@cvn-apache8:/# apt-get clean
2N: Ignoring file '20auto-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
3
4root@cvn-apache8:/# apt-get purge
5Reading package lists... Done
6Building dependency tree
7Reading state information... Done
8The following packages were automatically installed and are no longer required:
9 linux-image-3.13.0-49-generic linux-image-3.13.0-51-generic
10 linux-image-3.13.0-52-generic linux-image-3.13.0-53-generic
11 linux-image-3.13.0-54-generic linux-image-3.13.0-55-generic
12 linux-image-3.13.0-57-generic linux-image-3.13.0-58-generic
13 linux-image-3.13.0-59-generic linux-image-3.13.0-61-generic
14 linux-image-3.13.0-62-generic linux-image-3.13.0-63-generic
15 linux-image-3.13.0-65-generic linux-image-3.13.0-66-generic
16 linux-image-3.13.0-67-generic linux-image-3.13.0-68-generic
17 linux-image-3.13.0-70-generic linux-image-3.13.0-71-generic
18 linux-image-3.13.0-73-generic linux-image-3.13.0-74-generic
19 linux-tools-3.13.0-49 linux-tools-3.13.0-49-generic linux-tools-3.13.0-51
20 linux-tools-3.13.0-51-generic linux-tools-3.13.0-52
21 linux-tools-3.13.0-52-generic linux-tools-3.13.0-53
22 linux-tools-3.13.0-53-generic linux-tools-3.13.0-54
23 linux-tools-3.13.0-54-generic linux-tools-3.13.0-55
24 linux-tools-3.13.0-55-generic linux-tools-3.13.0-57
25 linux-tools-3.13.0-57-generic linux-tools-3.13.0-58
26 linux-tools-3.13.0-58-generic linux-tools-3.13.0-59
27 linux-tools-3.13.0-59-generic linux-tools-3.13.0-61
28 linux-tools-3.13.0-61-generic linux-tools-3.13.0-62
29 linux-tools-3.13.0-62-generic linux-tools-3.13.0-63
30 linux-tools-3.13.0-63-generic linux-tools-3.13.0-65
31 linux-tools-3.13.0-65-generic linux-tools-3.13.0-66
32 linux-tools-3.13.0-66-generic linux-tools-3.13.0-67
33 linux-tools-3.13.0-67-generic linux-tools-3.13.0-68
34 linux-tools-3.13.0-68-generic linux-tools-3.13.0-70
35 linux-tools-3.13.0-70-generic linux-tools-3.13.0-71
36 linux-tools-3.13.0-71-generic linux-tools-3.13.0-73
37 linux-tools-3.13.0-73-generic linux-tools-3.13.0-74
38 linux-tools-3.13.0-74-generic python3-distupgrade python3-gdbm
39 python3-update-manager ubuntu-release-upgrader-core
40Use 'apt-get autoremove' to remove them.
410 upgraded, 0 newly installed, 0 to remove and 112 not upgraded.
42N: Ignoring file '20auto-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
43
44root@cvn-apache8:/# apt-get autoremove
45Reading package lists... Done
46Building dependency tree
47Reading state information... Done
48The following packages will be REMOVED:
49 linux-image-3.13.0-49-generic linux-image-3.13.0-51-generic
50 linux-image-3.13.0-52-generic linux-image-3.13.0-53-generic
51 linux-image-3.13.0-54-generic linux-image-3.13.0-55-generic
52 linux-image-3.13.0-57-generic linux-image-3.13.0-58-generic
53 linux-image-3.13.0-59-generic linux-image-3.13.0-61-generic
54 linux-image-3.13.0-62-generic linux-image-3.13.0-63-generic
55 linux-image-3.13.0-65-generic linux-image-3.13.0-66-generic
56 linux-image-3.13.0-67-generic linux-image-3.13.0-68-generic
57 linux-image-3.13.0-70-generic linux-image-3.13.0-71-generic
58 linux-image-3.13.0-73-generic linux-image-3.13.0-74-generic
59 linux-tools-3.13.0-49 linux-tools-3.13.0-49-generic linux-tools-3.13.0-51
60 linux-tools-3.13.0-51-generic linux-tools-3.13.0-52
61 linux-tools-3.13.0-52-generic linux-tools-3.13.0-53
62 linux-tools-3.13.0-53-generic linux-tools-3.13.0-54
63 linux-tools-3.13.0-54-generic linux-tools-3.13.0-55
64 linux-tools-3.13.0-55-generic linux-tools-3.13.0-57
65 linux-tools-3.13.0-57-generic linux-tools-3.13.0-58
66 linux-tools-3.13.0-58-generic linux-tools-3.13.0-59
67 linux-tools-3.13.0-59-generic linux-tools-3.13.0-61
68 linux-tools-3.13.0-61-generic linux-tools-3.13.0-62
69 linux-tools-3.13.0-62-generic linux-tools-3.13.0-63
70 linux-tools-3.13.0-63-generic linux-tools-3.13.0-65
71 linux-tools-3.13.0-65-generic linux-tools-3.13.0-66
72 linux-tools-3.13.0-66-generic linux-tools-3.13.0-67
73 linux-tools-3.13.0-67-generic linux-tools-3.13.0-68
74 linux-tools-3.13.0-68-generic linux-tools-3.13.0-70
75 linux-tools-3.13.0-70-generic linux-tools-3.13.0-71
76 linux-tools-3.13.0-71-generic linux-tools-3.13.0-73
77 linux-tools-3.13.0-73-generic linux-tools-3.13.0-74
78 linux-tools-3.13.0-74-generic python3-distupgrade python3-gdbm
79 python3-update-manager ubuntu-release-upgrader-core
800 upgraded, 0 newly installed, 64 to remove and 108 not upgraded.
81After this operation, 886 MB disk space will be freed.
82Do you want to continue? [Y/n] Y
83(Reading database ... 58869 files and directories currently installed.)
84Removing linux-image-3.13.0-49-generic (3.13.0-49.83) ...
85Examining /etc/kernel/prerm.d.
86run-parts: executing /etc/kernel/prerm.d/last-good-boot 3.13.0-49-generic /boot/vmlinuz-3.13.0-49-generic
87Examining /etc/kernel/postrm.d .
88run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-49-generic /boot/vmlinuz-3.13.0-49-generic
89update-initramfs: Deleting /boot/initrd.img-3.13.0-49-generic
90run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-49-generic /boot/vmlinuz-3.13.0-49-generic
91Searching for GRUB installation directory ... found: /boot/grub
92Searching for default file ... found: /boot/grub/default
93Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
94Searching for splash image ... none found, skipping ...
95Found kernel: /boot/vmlinuz-3.13.0-77-generic
96Found kernel: /boot/vmlinuz-3.13.0-76-generic
97Found kernel: /boot/vmlinuz-3.13.0-74-generic
98Found kernel: /boot/vmlinuz-3.13.0-73-generic
99Found kernel: /boot/vmlinuz-3.13.0-71-generic
100Found kernel: /boot/vmlinuz-3.13.0-70-generic
101Found kernel: /boot/vmlinuz-3.13.0-68-generic
102Found kernel: /boot/vmlinuz-3.13.0-67-generic
103Found kernel: /boot/vmlinuz-3.13.0-66-generic
104Found kernel: /boot/vmlinuz-3.13.0-65-generic
105Found kernel: /boot/vmlinuz-3.13.0-63-generic
106Found kernel: /boot/vmlinuz-3.13.0-62-generic
107Found kernel: /boot/vmlinuz-3.13.0-61-generic
108Found kernel: /boot/vmlinuz-3.13.0-59-generic
109Found kernel: /boot/vmlinuz-3.13.0-58-generic
110Found kernel: /boot/vmlinuz-3.13.0-57-generic
111Found kernel: /boot/vmlinuz-3.13.0-55-generic
112Found kernel: /boot/vmlinuz-3.13.0-54-generic
113Found kernel: /boot/vmlinuz-3.13.0-53-generic
114Found kernel: /boot/vmlinuz-3.13.0-52-generic
115Found kernel: /boot/vmlinuz-3.13.0-51-generic
116Found kernel: /boot/vmlinuz-3.13.0-45-generic
117Updating /boot/grub/menu.lst ... done
118
119Removing linux-image-3.13.0-51-generic (3.13.0-51.84) ...
120Examining /etc/kernel/prerm.d.
121run-parts: executing /etc/kernel/prerm.d/last-good-boot 3.13.0-51-generic /boot/vmlinuz-3.13.0-51-generic
122Examining /etc/kernel/postrm.d .
123run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-51-generic /boot/vmlinuz-3.13.0-51-generic
124update-initramfs: Deleting /boot/initrd.img-3.13.0-51-generic
125run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-51-generic /boot/vmlinuz-3.13.0-51-generic
126Searching for GRUB installation directory ... found: /boot/grub
127Searching for default file ... found: /boot/grub/default
128Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
129Searching for splash image ... none found, skipping ...
130Found kernel: /boot/vmlinuz-3.13.0-77-generic
131Found kernel: /boot/vmlinuz-3.13.0-76-generic
132Found kernel: /boot/vmlinuz-3.13.0-74-generic
133Found kernel: /boot/vmlinuz-3.13.0-73-generic
134Found kernel: /boot/vmlinuz-3.13.0-71-generic
135Found kernel: /boot/vmlinuz-3.13.0-70-generic
136Found kernel: /boot/vmlinuz-3.13.0-68-generic
137Found kernel: /boot/vmlinuz-3.13.0-67-generic
138Found kernel: /boot/vmlinuz-3.13.0-66-generic
139Found kernel: /boot/vmlinuz-3.13.0-65-generic
140Found kernel: /boot/vmlinuz-3.13.0-63-generic
141Found kernel: /boot/vmlinuz-3.13.0-62-generic
142Found kernel: /boot/vmlinuz-3.13.0-61-generic
143Found kernel: /boot/vmlinuz-3.13.0-59-generic
144Found kernel: /boot/vmlinuz-3.13.0-58-generic
145Found kernel: /boot/vmlinuz-3.13.0-57-generic
146Found kernel: /boot/vmlinuz-3.13.0-55-generic
147Found kernel: /boot/vmlinuz-3.13.0-54-generic
148Found kernel: /boot/vmlinuz-3.13.0-53-generic
149Found kernel: /boot/vmlinuz-3.13.0-52-generic
150Found kernel: /boot/vmlinuz-3.13.0-45-generic
151Updating /boot/grub/menu.lst ... done
152
153Removing linux-image-3.13.0-52-generic (3.13.0-52.86) ...
154Examining /etc/kernel/prerm.d.
155run-parts: executing /etc/kernel/prerm.d/last-good-boot 3.13.0-52-generic /boot/vmlinuz-3.13.0-52-generic
156Examining /etc/kernel/postrm.d .
157run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-52-generic /boot/vmlinuz-3.13.0-52-generic
158update-initramfs: Deleting /boot/initrd.img-3.13.0-52-generic
159run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-52-generic /boot/vmlinuz-3.13.0-52-generic
160Searching for GRUB installation directory ... found: /boot/grub
161Searching for default file ... found: /boot/grub/default
162Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
163Searching for splash image ... none found, skipping ...
164Found kernel: /boot/vmlinuz-3.13.0-77-generic
165Found kernel: /boot/vmlinuz-3.13.0-76-generic
166Found kernel: /boot/vmlinuz-3.13.0-74-generic
167Found kernel: /boot/vmlinuz-3.13.0-73-generic
168Found kernel: /boot/vmlinuz-3.13.0-71-generic
169Found kernel: /boot/vmlinuz-3.13.0-70-generic
170Found kernel: /boot/vmlinuz-3.13.0-68-generic
171Found kernel: /boot/vmlinuz-3.13.0-67-generic
172Found kernel: /boot/vmlinuz-3.13.0-66-generic
173Found kernel: /boot/vmlinuz-3.13.0-65-generic
174Found kernel: /boot/vmlinuz-3.13.0-63-generic
175Found kernel: /boot/vmlinuz-3.13.0-62-generic
176Found kernel: /boot/vmlinuz-3.13.0-61-generic
177Found kernel: /boot/vmlinuz-3.13.0-59-generic
178Found kernel: /boot/vmlinuz-3.13.0-58-generic
179Found kernel: /boot/vmlinuz-3.13.0-57-generic
180Found kernel: /boot/vmlinuz-3.13.0-55-generic
181Found kernel: /boot/vmlinuz-3.13.0-54-generic
182Found kernel: /boot/vmlinuz-3.13.0-53-generic
183Found kernel: /boot/vmlinuz-3.13.0-45-generic
184Updating /boot/grub/menu.lst ... done
185
186Removing linux-image-3.13.0-53-generic (3.13.0-53.89) ...
187Examining /etc/kernel/prerm.d.
188run-parts: executing /etc/kernel/prerm.d/last-good-boot 3.13.0-53-generic /boot/vmlinuz-3.13.0-53-generic
189Examining /etc/kernel/postrm.d .
190run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-53-generic /boot/vmlinuz-3.13.0-53-generic
191update-initramfs: Deleting /boot/initrd.img-3.13.0-53-generic
192run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-53-generic /boot/vmlinuz-3.13.0-53-generic
193Searching for GRUB installation directory ... found: /boot/grub
194Searching for default file ... found: /boot/grub/default
195Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
196Searching for splash image ... none found, skipping ...
197Found kernel: /boot/vmlinuz-3.13.0-77-generic
198Found kernel: /boot/vmlinuz-3.13.0-76-generic
199Found kernel: /boot/vmlinuz-3.13.0-74-generic
200Found kernel: /boot/vmlinuz-3.13.0-73-generic
201Found kernel: /boot/vmlinuz-3.13.0-71-generic
202Found kernel: /boot/vmlinuz-3.13.0-70-generic
203Found kernel: /boot/vmlinuz-3.13.0-68-generic
204Found kernel: /boot/vmlinuz-3.13.0-67-generic
205Found kernel: /boot/vmlinuz-3.13.0-66-generic
206Found kernel: /boot/vmlinuz-3.13.0-65-generic
207Found kernel: /boot/vmlinuz-3.13.0-63-generic
208Found kernel: /boot/vmlinuz-3.13.0-62-generic
209Found kernel: /boot/vmlinuz-3.13.0-61-generic
210Found kernel: /boot/vmlinuz-3.13.0-59-generic
211Found kernel: /boot/vmlinuz-3.13.0-58-generic
212Found kernel: /boot/vmlinuz-3.13.0-57-generic
213Found kernel: /boot/vmlinuz-3.13.0-55-generic
214Found kernel: /boot/vmlinuz-3.13.0-54-generic
215Found kernel: /boot/vmlinuz-3.13.0-45-generic
216Updating /boot/grub/menu.lst ... done
217
218Removing linux-image-3.13.0-54-generic (3.13.0-54.91) ...
219Examining /etc/kernel/prerm.d.
220run-parts: executing /etc/kernel/prerm.d/last-good-boot 3.13.0-54-generic /boot/vmlinuz-3.13.0-54-generic
221Examining /etc/kernel/postrm.d .
222run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-54-generic /boot/vmlinuz-3.13.0-54-generic
223update-initramfs: Deleting /boot/initrd.img-3.13.0-54-generic
224run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-54-generic /boot/vmlinuz-3.13.0-54-generic
225Searching for GRUB installation directory ... found: /boot/grub
226Searching for default file ... found: /boot/grub/default
227Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
228Searching for splash image ... none found, skipping ...
229Found kernel: /boot/vmlinuz-3.13.0-77-generic
230Found kernel: /boot/vmlinuz-3.13.0-76-generic
231Found kernel: /boot/vmlinuz-3.13.0-74-generic
232Found kernel: /boot/vmlinuz-3.13.0-73-generic
233Found kernel: /boot/vmlinuz-3.13.0-71-generic
234Found kernel: /boot/vmlinuz-3.13.0-70-generic
235Found kernel: /boot/vmlinuz-3.13.0-68-generic
236Found kernel: /boot/vmlinuz-3.13.0-67-generic
237Found kernel: /boot/vmlinuz-3.13.0-66-generic
238Found kernel: /boot/vmlinuz-3.13.0-65-generic
239Found kernel: /boot/vmlinuz-3.13.0-63-generic
240Found kernel: /boot/vmlinuz-3.13.0-62-generic
241Found kernel: /boot/vmlinuz-3.13.0-61-generic
242Found kernel: /boot/vmlinuz-3.13.0-59-generic
243Found kernel: /boot/vmlinuz-3.13.0-58-generic
244Found kernel: /boot/vmlinuz-3.13.0-57-generic
245Found kernel: /boot/vmlinuz-3.13.0-55-generic
246Found kernel: /boot/vmlinuz-3.13.0-45-generic
247Updating /boot/grub/menu.lst ... done
248
249Removing linux-image-3.13.0-55-generic (3.13.0-55.94) ...
250Examining /etc/kernel/prerm.d.
251run-parts: executing /etc/kernel/prerm.d/last-good-boot 3.13.0-55-generic /boot/vmlinuz-3.13.0-55-generic
252Examining /etc/kernel/postrm.d .
253run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-55-generic /boot/vmlinuz-3.13.0-55-generic
254update-initramfs: Deleting /boot/initrd.img-3.13.0-55-generic
255run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-55-generic /boot/vmlinuz-3.13.0-55-generic
256Searching for GRUB installation directory ... found: /boot/grub
257Searching for default file ... found: /boot/grub/default
258Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
259Searching for splash image ... none found, skipping ...
260Found kernel: /boot/vmlinuz-3.13.0-77-generic
261Found kernel: /boot/vmlinuz-3.13.0-76-generic
262Found kernel: /boot/vmlinuz-3.13.0-74-generic
263Found kernel: /boot/vmlinuz-3.13.0-73-generic
264Found kernel: /boot/vmlinuz-3.13.0-71-generic
265Found kernel: /boot/vmlinuz-3.13.0-70-generic
266Found kernel: /boot/vmlinuz-3.13.0-68-generic
267Found kernel: /boot/vmlinuz-3.13.0-67-generic
268Found kernel: /boot/vmlinuz-3.13.0-66-generic
269Found kernel: /boot/vmlinuz-3.13.0-65-generic
270Found kernel: /boot/vmlinuz-3.13.0-63-generic
271Found kernel: /boot/vmlinuz-3.13.0-62-generic
272Found kernel: /boot/vmlinuz-3.13.0-61-generic
273Found kernel: /boot/vmlinuz-3.13.0-59-generic
274Found kernel: /boot/vmlinuz-3.13.0-58-generic
275Found kernel: /boot/vmlinuz-3.13.0-57-generic
276Found kernel: /boot/vmlinuz-3.13.0-45-generic
277Updating /boot/grub/menu.lst ... done
278
279Removing linux-image-3.13.0-57-generic (3.13.0-57.95) ...
280Examining /etc/kernel/prerm.d.
281run-parts: executing /etc/kernel/prerm.d/last-good-boot 3.13.0-57-generic /boot/vmlinuz-3.13.0-57-generic
282Examining /etc/kernel/postrm.d .
283run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-57-generic /boot/vmlinuz-3.13.0-57-generic
284update-initramfs: Deleting /boot/initrd.img-3.13.0-57-generic
285run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-57-generic /boot/vmlinuz-3.13.0-57-generic
286Searching for GRUB installation directory ... found: /boot/grub
287Searching for default file ... found: /boot/grub/default
288Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
289Searching for splash image ... none found, skipping ...
290Found kernel: /boot/vmlinuz-3.13.0-77-generic
291Found kernel: /boot/vmlinuz-3.13.0-76-generic
292Found kernel: /boot/vmlinuz-3.13.0-74-generic
293Found kernel: /boot/vmlinuz-3.13.0-73-generic
294Found kernel: /boot/vmlinuz-3.13.0-71-generic
295Found kernel: /boot/vmlinuz-3.13.0-70-generic
296Found kernel: /boot/vmlinuz-3.13.0-68-generic
297Found kernel: /boot/vmlinuz-3.13.0-67-generic
298Found kernel: /boot/vmlinuz-3.13.0-66-generic
299Found kernel: /boot/vmlinuz-3.13.0-65-generic
300Found kernel: /boot/vmlinuz-3.13.0-63-generic
301Found kernel: /boot/vmlinuz-3.13.0-62-generic
302Found kernel: /boot/vmlinuz-3.13.0-61-generic
303Found kernel: /boot/vmlinuz-3.13.0-59-generic
304Found kernel: /boot/vmlinuz-3.13.0-58-generic
305Found kernel: /boot/vmlinuz-3.13.0-45-generic
306Updating /boot/grub/menu.lst ... done
307
308Removing linux-image-3.13.0-58-generic (3.13.0-58.97) ...
309Examining /etc/kernel/prerm.d.
310run-parts: executing /etc/kernel/prerm.d/last-good-boot 3.13.0-58-generic /boot/vmlinuz-3.13.0-58-generic
311Examining /etc/kernel/postrm.d .
312run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-58-generic /boot/vmlinuz-3.13.0-58-generic
313update-initramfs: Deleting /boot/initrd.img-3.13.0-58-generic
314run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-58-generic /boot/vmlinuz-3.13.0-58-generic
315Searching for GRUB installation directory ... found: /boot/grub
316Searching for default file ... found: /boot/grub/default
317Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
318Searching for splash image ... none found, skipping ...
319Found kernel: /boot/vmlinuz-3.13.0-77-generic
320Found kernel: /boot/vmlinuz-3.13.0-76-generic
321Found kernel: /boot/vmlinuz-3.13.0-74-generic
322Found kernel: /boot/vmlinuz-3.13.0-73-generic
323Found kernel: /boot/vmlinuz-3.13.0-71-generic
324Found kernel: /boot/vmlinuz-3.13.0-70-generic
325Found kernel: /boot/vmlinuz-3.13.0-68-generic
326Found kernel: /boot/vmlinuz-3.13.0-67-generic
327Found kernel: /boot/vmlinuz-3.13.0-66-generic
328Found kernel: /boot/vmlinuz-3.13.0-65-generic
329Found kernel: /boot/vmlinuz-3.13.0-63-generic
330Found kernel: /boot/vmlinuz-3.13.0-62-generic
331Found kernel: /boot/vmlinuz-3.13.0-61-generic
332Found kernel: /boot/vmlinuz-3.13.0-59-generic
333Found kernel: /boot/vmlinuz-3.13.0-45-generic
334Updating /boot/grub/menu.lst ... done
335
336Removing linux-image-3.13.0-59-generic (3.13.0-59.98) ...
337Examining /etc/kernel/prerm.d.
338run-parts: executing /etc/kernel/prerm.d/last-good-boot 3.13.0-59-generic /boot/vmlinuz-3.13.0-59-generic
339Examining /etc/kernel/postrm.d .
340run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-59-generic /boot/vmlinuz-3.13.0-59-generic
341update-initramfs: Deleting /boot/initrd.img-3.13.0-59-generic
342run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-59-generic /boot/vmlinuz-3.13.0-59-generic
343Searching for GRUB installation directory ... found: /boot/grub
344Searching for default file ... found: /boot/grub/default
345Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
346Searching for splash image ... none found, skipping ...
347Found kernel: /boot/vmlinuz-3.13.0-77-generic
348Found kernel: /boot/vmlinuz-3.13.0-76-generic
349Found kernel: /boot/vmlinuz-3.13.0-74-generic
350Found kernel: /boot/vmlinuz-3.13.0-73-generic
351Found kernel: /boot/vmlinuz-3.13.0-71-generic
352Found kernel: /boot/vmlinuz-3.13.0-70-generic
353Found kernel: /boot/vmlinuz-3.13.0-68-generic
354Found kernel: /boot/vmlinuz-3.13.0-67-generic
355Found kernel: /boot/vmlinuz-3.13.0-66-generic
356Found kernel: /boot/vmlinuz-3.13.0-65-generic
357Found kernel: /boot/vmlinuz-3.13.0-63-generic
358Found kernel: /boot/vmlinuz-3.13.0-62-generic
359Found kernel: /boot/vmlinuz-3.13.0-61-generic
360Found kernel: /boot/vmlinuz-3.13.0-45-generic
361Updating /boot/grub/menu.lst ... done
362
363Removing linux-image-3.13.0-61-generic (3.13.0-61.100) ...
364Examining /etc/kernel/prerm.d.
365run-parts: executing /etc/kernel/prerm.d/last-good-boot 3.13.0-61-generic /boot/vmlinuz-3.13.0-61-generic
366Examining /etc/kernel/postrm.d .
367run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-61-generic /boot/vmlinuz-3.13.0-61-generic
368update-initramfs: Deleting /boot/initrd.img-3.13.0-61-generic
369run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-61-generic /boot/vmlinuz-3.13.0-61-generic
370Searching for GRUB installation directory ... found: /boot/grub
371Searching for default file ... found: /boot/grub/default
372Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
373Searching for splash image ... none found, skipping ...
374Found kernel: /boot/vmlinuz-3.13.0-77-generic
375Found kernel: /boot/vmlinuz-3.13.0-76-generic
376Found kernel: /boot/vmlinuz-3.13.0-74-generic
377Found kernel: /boot/vmlinuz-3.13.0-73-generic
378Found kernel: /boot/vmlinuz-3.13.0-71-generic
379Found kernel: /boot/vmlinuz-3.13.0-70-generic
380Found kernel: /boot/vmlinuz-3.13.0-68-generic
381Found kernel: /boot/vmlinuz-3.13.0-67-generic
382Found kernel: /boot/vmlinuz-3.13.0-66-generic
383Found kernel: /boot/vmlinuz-3.13.0-65-generic
384Found kernel: /boot/vmlinuz-3.13.0-63-generic
385Found kernel: /boot/vmlinuz-3.13.0-62-generic
386Found kernel: /boot/vmlinuz-3.13.0-45-generic
387Updating /boot/grub/menu.lst ... done
388
389Removing linux-image-3.13.0-62-generic (3.13.0-62.102) ...
390Examining /etc/kernel/prerm.d.
391run-parts: executing /etc/kernel/prerm.d/last-good-boot 3.13.0-62-generic /boot/vmlinuz-3.13.0-62-generic
392Examining /etc/kernel/postrm.d .
393run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-62-generic /boot/vmlinuz-3.13.0-62-generic
394update-initramfs: Deleting /boot/initrd.img-3.13.0-62-generic
395run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-62-generic /boot/vmlinuz-3.13.0-62-generic
396Searching for GRUB installation directory ... found: /boot/grub
397Searching for default file ... found: /boot/grub/default
398Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
399Searching for splash image ... none found, skipping ...
400Found kernel: /boot/vmlinuz-3.13.0-77-generic
401Found kernel: /boot/vmlinuz-3.13.0-76-generic
402Found kernel: /boot/vmlinuz-3.13.0-74-generic
403Found kernel: /boot/vmlinuz-3.13.0-73-generic
404Found kernel: /boot/vmlinuz-3.13.0-71-generic
405Found kernel: /boot/vmlinuz-3.13.0-70-generic
406Found kernel: /boot/vmlinuz-3.13.0-68-generic
407Found kernel: /boot/vmlinuz-3.13.0-67-generic
408Found kernel: /boot/vmlinuz-3.13.0-66-generic
409Found kernel: /boot/vmlinuz-3.13.0-65-generic
410Found kernel: /boot/vmlinuz-3.13.0-63-generic
411Found kernel: /boot/vmlinuz-3.13.0-45-generic
412Updating /boot/grub/menu.lst ... done
413
414Removing linux-image-3.13.0-63-generic (3.13.0-63.103) ...
415Examining /etc/kernel/prerm.d.
416run-parts: executing /etc/kernel/prerm.d/last-good-boot 3.13.0-63-generic /boot/vmlinuz-3.13.0-63-generic
417Examining /etc/kernel/postrm.d .
418run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-63-generic /boot/vmlinuz-3.13.0-63-generic
419update-initramfs: Deleting /boot/initrd.img-3.13.0-63-generic
420run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-63-generic /boot/vmlinuz-3.13.0-63-generic
421Searching for GRUB installation directory ... found: /boot/grub
422Searching for default file ... found: /boot/grub/default
423Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
424Searching for splash image ... none found, skipping ...
425Found kernel: /boot/vmlinuz-3.13.0-77-generic
426Found kernel: /boot/vmlinuz-3.13.0-76-generic
427Found kernel: /boot/vmlinuz-3.13.0-74-generic
428Found kernel: /boot/vmlinuz-3.13.0-73-generic
429Found kernel: /boot/vmlinuz-3.13.0-71-generic
430Found kernel: /boot/vmlinuz-3.13.0-70-generic
431Found kernel: /boot/vmlinuz-3.13.0-68-generic
432Found kernel: /boot/vmlinuz-3.13.0-67-generic
433Found kernel: /boot/vmlinuz-3.13.0-66-generic
434Found kernel: /boot/vmlinuz-3.13.0-65-generic
435Found kernel: /boot/vmlinuz-3.13.0-45-generic
436Updating /boot/grub/menu.lst ... done
437
438Removing linux-image-3.13.0-65-generic (3.13.0-65.106) ...
439Examining /etc/kernel/prerm.d.
440run-parts: executing /etc/kernel/prerm.d/last-good-boot 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
441Examining /etc/kernel/postrm.d .
442run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
443update-initramfs: Deleting /boot/initrd.img-3.13.0-65-generic
444run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-65-generic /boot/vmlinuz-3.13.0-65-generic
445Searching for GRUB installation directory ... found: /boot/grub
446Searching for default file ... found: /boot/grub/default
447Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
448Searching for splash image ... none found, skipping ...
449Found kernel: /boot/vmlinuz-3.13.0-77-generic
450Found kernel: /boot/vmlinuz-3.13.0-76-generic
451Found kernel: /boot/vmlinuz-3.13.0-74-generic
452Found kernel: /boot/vmlinuz-3.13.0-73-generic
453Found kernel: /boot/vmlinuz-3.13.0-71-generic
454Found kernel: /boot/vmlinuz-3.13.0-70-generic
455Found kernel: /boot/vmlinuz-3.13.0-68-generic
456Found kernel: /boot/vmlinuz-3.13.0-67-generic
457Found kernel: /boot/vmlinuz-3.13.0-66-generic
458Found kernel: /boot/vmlinuz-3.13.0-45-generic
459Updating /boot/grub/menu.lst ... done
460
461Removing linux-image-3.13.0-66-generic (3.13.0-66.108) ...
462Examining /etc/kernel/prerm.d.
463run-parts: executing /etc/kernel/prerm.d/last-good-boot 3.13.0-66-generic /boot/vmlinuz-3.13.0-66-generic
464Examining /etc/kernel/postrm.d .
465run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-66-generic /boot/vmlinuz-3.13.0-66-generic
466update-initramfs: Deleting /boot/initrd.img-3.13.0-66-generic
467run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-66-generic /boot/vmlinuz-3.13.0-66-generic
468Searching for GRUB installation directory ... found: /boot/grub
469Searching for default file ... found: /boot/grub/default
470Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
471Searching for splash image ... none found, skipping ...
472Found kernel: /boot/vmlinuz-3.13.0-77-generic
473Found kernel: /boot/vmlinuz-3.13.0-76-generic
474Found kernel: /boot/vmlinuz-3.13.0-74-generic
475Found kernel: /boot/vmlinuz-3.13.0-73-generic
476Found kernel: /boot/vmlinuz-3.13.0-71-generic
477Found kernel: /boot/vmlinuz-3.13.0-70-generic
478Found kernel: /boot/vmlinuz-3.13.0-68-generic
479Found kernel: /boot/vmlinuz-3.13.0-67-generic
480Found kernel: /boot/vmlinuz-3.13.0-45-generic
481Updating /boot/grub/menu.lst ... done
482
483Removing linux-image-3.13.0-67-generic (3.13.0-67.110) ...
484Examining /etc/kernel/prerm.d.
485run-parts: executing /etc/kernel/prerm.d/last-good-boot 3.13.0-67-generic /boot/vmlinuz-3.13.0-67-generic
486Examining /etc/kernel/postrm.d .
487run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-67-generic /boot/vmlinuz-3.13.0-67-generic
488update-initramfs: Deleting /boot/initrd.img-3.13.0-67-generic
489run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-67-generic /boot/vmlinuz-3.13.0-67-generic
490Searching for GRUB installation directory ... found: /boot/grub
491Searching for default file ... found: /boot/grub/default
492Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
493Searching for splash image ... none found, skipping ...
494Found kernel: /boot/vmlinuz-3.13.0-77-generic
495Found kernel: /boot/vmlinuz-3.13.0-76-generic
496Found kernel: /boot/vmlinuz-3.13.0-74-generic
497Found kernel: /boot/vmlinuz-3.13.0-73-generic
498Found kernel: /boot/vmlinuz-3.13.0-71-generic
499Found kernel: /boot/vmlinuz-3.13.0-70-generic
500Found kernel: /boot/vmlinuz-3.13.0-68-generic
501Found kernel: /boot/vmlinuz-3.13.0-45-generic
502Updating /boot/grub/menu.lst ... done
503
504Removing linux-image-3.13.0-68-generic (3.13.0-68.111) ...
505Examining /etc/kernel/prerm.d.
506run-parts: executing /etc/kernel/prerm.d/last-good-boot 3.13.0-68-generic /boot/vmlinuz-3.13.0-68-generic
507Examining /etc/kernel/postrm.d .
508run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-68-generic /boot/vmlinuz-3.13.0-68-generic
509update-initramfs: Deleting /boot/initrd.img-3.13.0-68-generic
510run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-68-generic /boot/vmlinuz-3.13.0-68-generic
511Searching for GRUB installation directory ... found: /boot/grub
512Searching for default file ... found: /boot/grub/default
513Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
514Searching for splash image ... none found, skipping ...
515Found kernel: /boot/vmlinuz-3.13.0-77-generic
516Found kernel: /boot/vmlinuz-3.13.0-76-generic
517Found kernel: /boot/vmlinuz-3.13.0-74-generic
518Found kernel: /boot/vmlinuz-3.13.0-73-generic
519Found kernel: /boot/vmlinuz-3.13.0-71-generic
520Found kernel: /boot/vmlinuz-3.13.0-70-generic
521Found kernel: /boot/vmlinuz-3.13.0-45-generic
522Updating /boot/grub/menu.lst ... done
523
524Removing linux-image-3.13.0-70-generic (3.13.0-70.113) ...
525Examining /etc/kernel/prerm.d.
526run-parts: executing /etc/kernel/prerm.d/last-good-boot 3.13.0-70-generic /boot/vmlinuz-3.13.0-70-generic
527Examining /etc/kernel/postrm.d .
528run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-70-generic /boot/vmlinuz-3.13.0-70-generic
529update-initramfs: Deleting /boot/initrd.img-3.13.0-70-generic
530run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-70-generic /boot/vmlinuz-3.13.0-70-generic
531Searching for GRUB installation directory ... found: /boot/grub
532Searching for default file ... found: /boot/grub/default
533Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
534Searching for splash image ... none found, skipping ...
535Found kernel: /boot/vmlinuz-3.13.0-77-generic
536Found kernel: /boot/vmlinuz-3.13.0-76-generic
537Found kernel: /boot/vmlinuz-3.13.0-74-generic
538Found kernel: /boot/vmlinuz-3.13.0-73-generic
539Found kernel: /boot/vmlinuz-3.13.0-71-generic
540Found kernel: /boot/vmlinuz-3.13.0-45-generic
541Updating /boot/grub/menu.lst ... done
542
543Removing linux-image-3.13.0-71-generic (3.13.0-71.114) ...
544Examining /etc/kernel/prerm.d.
545run-parts: executing /etc/kernel/prerm.d/last-good-boot 3.13.0-71-generic /boot/vmlinuz-3.13.0-71-generic
546Examining /etc/kernel/postrm.d .
547run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-71-generic /boot/vmlinuz-3.13.0-71-generic
548update-initramfs: Deleting /boot/initrd.img-3.13.0-71-generic
549run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-71-generic /boot/vmlinuz-3.13.0-71-generic
550Searching for GRUB installation directory ... found: /boot/grub
551Searching for default file ... found: /boot/grub/default
552Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
553Searching for splash image ... none found, skipping ...
554Found kernel: /boot/vmlinuz-3.13.0-77-generic
555Found kernel: /boot/vmlinuz-3.13.0-76-generic
556Found kernel: /boot/vmlinuz-3.13.0-74-generic
557Found kernel: /boot/vmlinuz-3.13.0-73-generic
558Found kernel: /boot/vmlinuz-3.13.0-45-generic
559Updating /boot/grub/menu.lst ... done
560
561Removing linux-image-3.13.0-73-generic (3.13.0-73.116) ...
562Examining /etc/kernel/prerm.d.
563run-parts: executing /etc/kernel/prerm.d/last-good-boot 3.13.0-73-generic /boot/vmlinuz-3.13.0-73-generic
564Examining /etc/kernel/postrm.d .
565run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-73-generic /boot/vmlinuz-3.13.0-73-generic
566update-initramfs: Deleting /boot/initrd.img-3.13.0-73-generic
567run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-73-generic /boot/vmlinuz-3.13.0-73-generic
568Searching for GRUB installation directory ... found: /boot/grub
569Searching for default file ... found: /boot/grub/default
570Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
571Searching for splash image ... none found, skipping ...
572Found kernel: /boot/vmlinuz-3.13.0-77-generic
573Found kernel: /boot/vmlinuz-3.13.0-76-generic
574Found kernel: /boot/vmlinuz-3.13.0-74-generic
575Found kernel: /boot/vmlinuz-3.13.0-45-generic
576Updating /boot/grub/menu.lst ... done
577
578Removing linux-image-3.13.0-74-generic (3.13.0-74.118) ...
579Examining /etc/kernel/prerm.d.
580run-parts: executing /etc/kernel/prerm.d/last-good-boot 3.13.0-74-generic /boot/vmlinuz-3.13.0-74-generic
581Examining /etc/kernel/postrm.d .
582run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-74-generic /boot/vmlinuz-3.13.0-74-generic
583update-initramfs: Deleting /boot/initrd.img-3.13.0-74-generic
584run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-74-generic /boot/vmlinuz-3.13.0-74-generic
585Searching for GRUB installation directory ... found: /boot/grub
586Searching for default file ... found: /boot/grub/default
587Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
588Searching for splash image ... none found, skipping ...
589Found kernel: /boot/vmlinuz-3.13.0-77-generic
590Found kernel: /boot/vmlinuz-3.13.0-76-generic
591Found kernel: /boot/vmlinuz-3.13.0-45-generic
592Updating /boot/grub/menu.lst ... done
593
594Removing linux-tools-3.13.0-49-generic (3.13.0-49.83) ...
595Removing linux-tools-3.13.0-49 (3.13.0-49.83) ...
596Removing linux-tools-3.13.0-51-generic (3.13.0-51.84) ...
597Removing linux-tools-3.13.0-51 (3.13.0-51.84) ...
598Removing linux-tools-3.13.0-52-generic (3.13.0-52.86) ...
599Removing linux-tools-3.13.0-52 (3.13.0-52.86) ...
600Removing linux-tools-3.13.0-53-generic (3.13.0-53.89) ...
601Removing linux-tools-3.13.0-53 (3.13.0-53.89) ...
602Removing linux-tools-3.13.0-54-generic (3.13.0-54.91) ...
603Removing linux-tools-3.13.0-54 (3.13.0-54.91) ...
604Removing linux-tools-3.13.0-55-generic (3.13.0-55.94) ...
605Removing linux-tools-3.13.0-55 (3.13.0-55.94) ...
606Removing linux-tools-3.13.0-57-generic (3.13.0-57.95) ...
607Removing linux-tools-3.13.0-57 (3.13.0-57.95) ...
608Removing linux-tools-3.13.0-58-generic (3.13.0-58.97) ...
609Removing linux-tools-3.13.0-58 (3.13.0-58.97) ...
610Removing linux-tools-3.13.0-59-generic (3.13.0-59.98) ...
611Removing linux-tools-3.13.0-59 (3.13.0-59.98) ...
612Removing linux-tools-3.13.0-61-generic (3.13.0-61.100) ...
613Removing linux-tools-3.13.0-61 (3.13.0-61.100) ...
614Removing linux-tools-3.13.0-62-generic (3.13.0-62.102) ...
615Removing linux-tools-3.13.0-62 (3.13.0-62.102) ...
616Removing linux-tools-3.13.0-63-generic (3.13.0-63.103) ...
617Removing linux-tools-3.13.0-63 (3.13.0-63.103) ...
618Removing linux-tools-3.13.0-65-generic (3.13.0-65.106) ...
619Removing linux-tools-3.13.0-65 (3.13.0-65.106) ...
620Removing linux-tools-3.13.0-66-generic (3.13.0-66.108) ...
621Removing linux-tools-3.13.0-66 (3.13.0-66.108) ...
622Removing linux-tools-3.13.0-67-generic (3.13.0-67.110) ...
623Removing linux-tools-3.13.0-67 (3.13.0-67.110) ...
624Removing linux-tools-3.13.0-68-generic (3.13.0-68.111) ...
625Removing linux-tools-3.13.0-68 (3.13.0-68.111) ...
626Removing linux-tools-3.13.0-70-generic (3.13.0-70.113) ...
627Removing linux-tools-3.13.0-70 (3.13.0-70.113) ...
628Removing linux-tools-3.13.0-71-generic (3.13.0-71.114) ...
629Removing linux-tools-3.13.0-71 (3.13.0-71.114) ...
630Removing linux-tools-3.13.0-73-generic (3.13.0-73.116) ...
631Removing linux-tools-3.13.0-73 (3.13.0-73.116) ...
632Removing linux-tools-3.13.0-74-generic (3.13.0-74.118) ...
633Removing linux-tools-3.13.0-74 (3.13.0-74.118) ...
634Removing ubuntu-release-upgrader-core (1:0.220.6) ...
635Removing python3-gdbm:amd64 (3.4.0-0ubuntu1) ...
636Removing python3-update-manager (1:0.196.12) ...
637Removing python3-distupgrade (1:0.220.6) ...
638Processing triggers for man-db (2.6.7.1-1ubuntu1) ...

Screen Shot 2016-02-18 at 21.50.28.png (1×1 px, 168 KB)

Firstly, I'm curious what this error is about:

N: Ignoring file '20auto-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension

Secondly, is there something we can do to avoid the indefinite growth (if it is indeed indefinite) of apt caches and old kernel images? That would help lower the required dull maintenance for each instance and make things more unattended.

Event Timeline

Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald Transcript

/etc/apt/apt.conf.d/20auto-upgrades.ucf-dist is covered by T110055.

For "the other direction", we rely on apt::unattendedupgrades which uses the standard package unattended-upgrades. Is there a similar standard solution in Ubuntu/Debian to clean those caches?

chasemp triaged this task as Medium priority.Apr 4 2016, 2:26 PM
AlexMonk-WMF renamed this task from Avoid indefinite growing of apt caches and and old kernel images to Avoid indefinite growing of apt caches and old kernel images.Aug 15 2016, 12:18 AM

This still happens sometimes on our current Debian VMs. Some timer or cron that runs apt clean once in a while would fix things.

Change 605979 had a related patch set uploaded (by Bstorm; owner: Bstorm):
[operations/puppet@production] cloud apt: set periodic autocleaning to once a week

https://gerrit.wikimedia.org/r/605979

Change 605979 merged by Bstorm:
[operations/puppet@production] cloud apt: set periodic autocleaning to once a week

https://gerrit.wikimedia.org/r/605979

There is a setting for unattended upgrades that allows it to remove old kernels, but I think that should be optional via hiera. I'll propose a patch for that.

Change 606234 had a related patch set uploaded (by Bstorm; owner: Bstorm):
[operations/puppet@production] unattendedupgrades: allow configurable kernel cleanup

https://gerrit.wikimedia.org/r/606234

Change 606234 merged by Bstorm:
[operations/puppet@production] unattendedupgrades: allow configurable kernel cleanup

https://gerrit.wikimedia.org/r/606234

Testing the kernel removal option on toolsbeta-workflow-test

So I can confirm that the daily autoclean is working. The kernel removal seems overridden by options in the upstream config.

Ok, I've reverted kernel cleanup options. I think that the deprecation schedule should honestly take care of long tails of kernels anyway. I'm going to call this done.