[solved] How do I keep deb files after installing a package

Kernels & Hardware, configuring network, installing services

[solved] How do I keep deb files after installing a package

Postby gi1242 » 2018-03-12 14:33

Hi All

If I install a package with apt, then it deletes the .deb file immediately after it installs the package. If I install the package with apt-get or aptitude then the .deb file is kept.

How do I change this? I would like apt to keep the .deb file for a bit, until I run an apt autoclean every few weeks.

Thanks in advance
Last edited by gi1242 on 2018-03-12 15:18, edited 1 time in total.
gi1242
 
Posts: 13
Joined: 2009-10-30 01:33

Re: [apt] How do I keep ".deb" files after installing a pack

Postby bw123 » 2018-03-12 15:03

from /usr/share/doc/apt/NEWS.Debian.gz


[ Automatic removal of debs after install ]
After packages are successfully installed by apt(8),
the corresponding .deb package files will be
removed from the /var/cache/apt/archives cache directory.

This can be changed by setting the apt configuration option
"Binary::apt::APT::Keep-Downloaded-Packages" to "true". E.g:

# echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' \
> /etc/apt/apt.conf.d/01keep-debs

Please note that the behavior of apt-get is unchanged. The
downloaded debs will be kept in the cache directory after they
are installed. To enable the behavior for other tools, you can set
"APT::Keep-Downloaded-Packages" to false.

User avatar
bw123
 
Posts: 3273
Joined: 2011-05-09 06:02
Location: TN_USA

Re: [apt] How do I keep ".deb" files after installing a pack

Postby gi1242 » 2018-03-12 15:17

Thanks so much!
gi1242
 
Posts: 13
Joined: 2009-10-30 01:33

Re: [solved] How do I keep deb files after installing a pack

Postby emariz » 2018-03-13 13:52

Glad to know that you got solved your issue.
bw123 forgot to paste the date of that changelog, though. :lol:

Code: Select all
-- Michael Vogt <mvo@debian.org>  Tue, 05 Jan 2016 19:22:16 +0100


Keep in mind that one can also grab previous versions of packages using the Snapshot system.
http://snapshot.debian.org/
emariz
 
Posts: 2904
Joined: 2008-10-17 07:59


Return to System configuration

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable