Manual for apt
Ralf Mardorf
silver.bullet at zoho.com
Sat Sep 3 17:05:40 UTC 2016
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 :)
is there such a command as "apt-config dump" for apt-get, too?
Btw. "apt clean" works, too.
[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
[weremouse at moonstudio ~]$ sudo apt clean
[weremouse at moonstudio ~]$ ls -Al /var/cache/apt/archives/
total 4
-rw-r----- 1 root root 0 Sep 3 09:14 lock
drwx------ 2 _apt root 4096 Sep 3 18:49 partial
On Sat, 3 Sep 2016 18:24:56 +0200, Petter Adsen wrote:
>One of the small things I like about apt is that 'apt update -qq' will
>produce no output if there are no updates, otherwise it will print how
>many packages have updates. IIRC, apt-get does not do that.
Too funny, apt-get is quieter than apt, but apt's output is useful.
[weremouse at moonstudio ~]$ sudo apt-get -q=2 dist-upgrade
[weremouse at moonstudio ~]$ sudo apt -q=2 full-upgrade
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[weremouse at moonstudio ~]$ man apt-get | grep quiet
-q, --quiet
Quiet; produces output suitable for logging, omitting progress indicators. More q's will produce more quiet up
to a maximum of 2. You can also use -q=# to set the quiet level, overriding the configuration file. Note that
quiet level 2 implies -y; you should never use -qq without a no-action modifier such as -d, --print-uris or -s
as APT may decide to do something you did not expect. Configuration Item: quiet.
[weremouse at moonstudio ~]$ sudo apt-get -q=2 update
[weremouse at moonstudio ~]$ sudo apt -q=2 update
All packages are up to date.
Regards,
Ralf
More information about the ubuntu-users
mailing list