Manual for apt

Tom H tomh0665 at gmail.com
Sun Sep 4 11:47:26 UTC 2016


On Sat, Sep 3, 2016 at 1:05 PM, Ralf Mardorf <silver.bullet at zoho.com> wrote:
> On Sat, 3 Sep 2016 09:28:10 -0400, Tom H wrote:


>> On Ubuntu 16.10 (and possibly on a more recent Debian release than
>> Debian 8):
>>
>> # apt-get clean
>>
>> # apt dist-upgrade
>> ...
>> 13 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
>> ...
>>
>> # ls /var/cache/apt/archives/
>> lock  partial/
>>
>> # apt-config dump | grep Keep-Downloaded-Packages
>> Binary::apt::APT::Keep-Downloaded-Packages "0";
>
> Thank you Tom :)

You're welcome.


> is there such a command as "apt-config dump" for apt-get, too?

AFAIK, "apt-config dump" is meant to be for apt-get - at least historically.

After I sent my previous email, I thought that it must mean that deb
files of packages installed with apt-get would also not be saved. I
now have some upgradable packages again so:

# apt-get clean

# apt-get dist-upgrade
...
3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
...

# ls /var/cache/apt/archives/
dnsmasq_2.76-4_all.deb dnsmasq-base_2.76-4_amd64.deb  lock  partial/
ubuntu-keyring_2016.09.01_all.deb

# apt-config dump | grep Keep-Down
Binary::apt::APT::Keep-Downloaded-Packages "0";
#

So there's now a disconnect between apt-get and apt-config :(


> Btw. "apt clean" works, too.

Thanks. Force of habit...


> [weremouse at moonstudio ~]$ apt-config dump | grep Keep-Downloaded-Packages
> Binary::apt::APT::Keep-Downloaded-Packages "0";
> [weremouse at moonstudio ~]$ sudo apt -o APT::Keep-Downloaded-Packages="1" install alpine-pico
> [snip]
> [weremouse at moonstudio ~]$ ls -Al /var/cache/apt/archives/
> total 296
> -rw-r--r-- 1 root root 298066 Dec 11  2015 alpine-pico_2.20+dfsg1-2_amd64.deb
> -rw-r----- 1 root root      0 Sep  3 09:14 lock
> drwx------ 2 _apt root   4096 Sep  3 18:49 partial

Good test. Thanks.




More information about the ubuntu-users mailing list