1

I know that apt-get ( as in sudo apt-get install vim) stores downloaded packages in /var/cache/apt/archives. However, when using apt (as in sudo apt install vim) instead, there are no packages stored in /var/cache/apt/archives.

Where does apt store packages?

  • @Ravexina shoot! And I was so proud of my digging. Surprised that I didn't find that one while searching! – zwets Aug 9 '18 at 21:18
4

Intriguing question! I donned my deerstalker, stuffed my pipe and did some digging. The answer is: apt does not archive packages.

The story goes back to Friday, 13 Sep 2002, when Daniel Quinlan filed bug report #160743, entitled "apt-get clean should run weekly". The rationale was that "The apt package cache grows without bound [...] runs the danger of filling up smaller disks, especially on systems run by less experienced Debian adminstrators."

The bug was closed 14 years later, on 2 Jan 2016, with little fanfare. The change isn't even mentioned in the changelog entry for apt 1.2. The commit message reads:

commit ee02b5b3949372a178d37cadaa08db0bfd5b991f
Author: Michael Vogt <mvo@ubuntu.com>
Date:   Sat Jan 2 22:08:30 2016 +0100

Add new APT::Keep-Downloaded-Packages option

This option controls if downloaded packages should be kept after
a successful install or if they should be deleted. The default
for "apt-get" is that they are kept (just like before).

However the default for "apt" is that they get deleted.

Closes: #160743

So there you have it. I suppose that the introduction of the new end-user oriented apt command (note that apt-get is kept backward-compatible so as not to break scripts), was the perfect occasion for closing this historical issue.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.