Debian Bug report logs - #661947
apt-get clean deletes /var/cache/apt/*.bin

version graph

Package: apt; Maintainer for apt is APT Development Team <deity@lists.debian.org>; Source for apt is src:apt (PTS, buildd, popcon).

Reported by: Vagrant Cascadian <vagrant@debian.org>

Date: Fri, 2 Mar 2012 21:33:01 UTC

Severity: normal

Found in version apt/0.8.15.9

Done: David Kalnischkies <david@kalnischkies.de>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#661947; Package apt. (Fri, 02 Mar 2012 21:33:04 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@debian.org>:
New Bug report received and forwarded. Copy sent to APT Development Team <deity@lists.debian.org>. (Fri, 02 Mar 2012 21:33:05 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: apt-get clean deletes /var/cache/apt/*.bin
Date: Fri, 2 Mar 2012 13:28:53 -0800
Package: apt
Version: 0.8.15.9
Severity: normal

when i run apt-get clean, it deletes the files /var/cache/apt/pkgcache.bin and
/var/cache/apt/srcpkgcache.bin.

this also applies to the version in experimental (0.8.16~exp12), but the
version in squeeze (0.8.10.3+squeeze1) doesn't exhibit this behavior.

is this an intentional change? 

removing *.bin causes some issues with copy-on-write root filesystems,
needlessly recreating the *.bin files, though i'm able to reproduce the
behavior on several fairly conventional installs as well.

thanks for the exellence that is apt!

live well,
  vagrant




Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#661947; Package apt. (Sat, 03 Mar 2012 11:27:08 GMT) (full text, mbox, link).


Acknowledgement sent to Julian Andres Klode <jak@debian.org>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Sat, 03 Mar 2012 11:27:13 GMT) (full text, mbox, link).


Message #10 received at 661947@bugs.debian.org (full text, mbox, reply):

From: Julian Andres Klode <jak@debian.org>
To: Vagrant Cascadian <vagrant@debian.org>, 661947@bugs.debian.org
Subject: Re: Bug#661947: apt-get clean deletes /var/cache/apt/*.bin
Date: Sat, 3 Mar 2012 12:24:43 +0100
On Fri, Mar 02, 2012 at 01:28:53PM -0800, Vagrant Cascadian wrote:
> Package: apt
> Version: 0.8.15.9
> Severity: normal
> 
> when i run apt-get clean, it deletes the files /var/cache/apt/pkgcache.bin and
> /var/cache/apt/srcpkgcache.bin.
> 
> this also applies to the version in experimental (0.8.16~exp12), but the
> version in squeeze (0.8.10.3+squeeze1) doesn't exhibit this behavior.
> 
> is this an intentional change? 

Removing the cache files in update/clean helps if your cache files
became corrupted somehow.

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.




Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#661947; Package apt. (Mon, 12 Mar 2012 18:21:04 GMT) (full text, mbox, link).


Acknowledgement sent to sergio <mailbox@sergio.spb.ru>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>. (Mon, 12 Mar 2012 18:21:04 GMT) (full text, mbox, link).


Message #15 received at 661947@bugs.debian.org (full text, mbox, reply):

From: sergio <mailbox@sergio.spb.ru>
To: 661947@bugs.debian.org
Subject: apt-get clean deletes /var/cache/apt/*.bin
Date: Mon, 12 Mar 2012 21:34:58 +0400
apt-get clean must not remove pkgcache.bin and srcpkgcache.bin !

Everyone who says 'apt-get clean' doesn't expect, that it will remove
caches, moreover it's undocumented.

Clean is suitable to run after dist-upgrade as update before.
No one will say update after clean for create caches back.

Please, return the normal behaviour back, and doesn't touch it in the
future.

If anyone wants to repair corrupted cache, there are update.

-- 
sergio.




Reply sent to David Kalnischkies <david@kalnischkies.de>:
You have taken responsibility. (Fri, 14 Aug 2015 08:09:09 GMT) (full text, mbox, link).


Notification sent to Vagrant Cascadian <vagrant@debian.org>:
Bug acknowledged by developer. (Fri, 14 Aug 2015 08:09:09 GMT) (full text, mbox, link).


Message #20 received at 661947-done@bugs.debian.org (full text, mbox, reply):

From: David Kalnischkies <david@kalnischkies.de>
To: sergio <mailbox@sergio.spb.ru>
Cc: 661947-done@bugs.debian.org
Subject: Re: apt-get clean deletes /var/cache/apt/*.bin
Date: Fri, 14 Aug 2015 10:05:09 +0200
[Message part 1 (text/plain, inline)]
On Mon, Mar 12, 2012 at 09:34:58PM +0400, sergio wrote:
> Clean is suitable to run after dist-upgrade as update before.
> No one will say update after clean for create caches back.

Any apt command will recreate the caches, not just update. On the other
hand, if the caches exist all commands will use it and if it is corrupt
they all will crash.

btw: At least the pkgcache is invalid after a dist-upgrade anyway.

If you want a command which just regenerates the caches to ensure they
are recent, try "apt-cache gencaches", but as said, any apt command
needing them will do that implicitely.


> If anyone wants to repair corrupted cache, there are update.

Corrupted caches result in segfaults. People do random things then they
encounter a segfault. Most browse the web and the first thing suggested
there is 'apt-get clean' as that helps with all sorts of problems.  It
is also consistent with other comments which use the clean subcommand to
remove intermediate files which can easily be regenerated if need be,
like make, git, ….

So, not a bug, but a feature/working as designed. Hence closing.


Best regards

David Kalnischkies
[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 12 Sep 2015 07:35:58 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Jan 13 21:28:09 2018; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.