APT /etc/apt/apt.conf.d/docker-gzip-indexes

Original 📋 Debian 9 (Stretch) 10 lines

Works On

Viewing:
Debian 9 (Stretch)
Same on:
Debian 10 (Buster) Debian 11 (Bullseye) Debian 12 (Bookworm) Debian 13 (Trixie)
Other versions:

Details

Size
10 lines
MD5
2b32d08be3b653925c80f5ded1175ab8
SHA256
9da4604fbac169caa47e787b4d85c8e06c887603878afa2a61f39fd551a41359
/etc/apt/apt.conf.d/docker-gzip-indexes
# Since Docker users using "RUN apt-get update && apt-get install -y ..." in
# their Dockerfiles don't go delete the lists files afterwards, we want them to
# be as small as possible on-disk, so we explicitly request that Apt keep them
# compressed on-disk too instead of decompressing them.

# For comparison, an "apt-get update" layer without this on a pristine
# "debian:wheezy" base image was "29.88 MB", where with this it was only
# "8.273 MB".

Acquire::GzipIndexes "true";

Copy & Paste

curl:
curl https://exampleconfig.com/api/v1/config/original/2b32d08be3b653925c80f5ded1175ab8?hint=docker-gzip-indexes
wget:
wget -O docker-gzip-indexes https://exampleconfig.com/api/v1/config/original/2b32d08be3b653925c80f5ded1175ab8?hint=docker-gzip-indexes

For AI Agents

<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/2b32d08be3b653925c80f5ded1175ab8?hint=docker-gzip-indexes' /><config><app>APT</app><os>Debian 9 (Stretch)</os><location>/etc/apt/apt.conf.d/docker-gzip-indexes</location><lines>10</lines><md5>2b32d08be3b653925c80f5ded1175ab8</md5><sha256>9da4604fbac169caa47e787b4d85c8e06c887603878afa2a61f39fd551a41359</sha256></config></prompt>

Paste into Claude, ChatGPT, or any AI assistant.

Install APT

Debian

sudo apt update && sudo apt install apt

Ubuntu

sudo apt update && sudo apt install apt

File Location

File Path
/etc/apt/apt.conf.d/docker-gzip-indexes
Directory
/etc/apt/apt.conf.d/
Significance
System-wide configuration directory
Description
Files in /etc/ contain system-wide configuration settings that affect all users.

FAQ

When should I use this docker-gzip-indexes?

Use it to restore a missing default, confirm what shipped, or diff against your current APT config.

How do I restore APT defaults?

Download the file, back up the current one in /etc/apt/apt.conf.d/docker-gzip-indexes, replace it, then reload or restart APT.

Is docker-gzip-indexes safe for production?

It is the vendor default for Debian 9 (Stretch). Treat it as a baseline and review security and performance settings before production use.

How does this differ from other OS versions?

Defaults vary by distro and version. This copy matches Debian 9 (Stretch).

Can I use this for APT troubleshooting?

Yes. Diff it against yours to find drift, then restore only the sections you need.