Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

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

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
gi1242
Posts: 17
Joined: 2009-10-30 01:33

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

#1 Post by gi1242 »

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.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

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

#2 Post by bw123 »

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.
resigned by AI ChatGPT

gi1242
Posts: 17
Joined: 2009-10-30 01:33

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

#3 Post by gi1242 »

Thanks so much!

emariz
Posts: 2901
Joined: 2008-10-17 07:59

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

#4 Post by emariz »

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/

Post Reply