APT /etc/logrotate.d/apt

Original 📋 Debian 9 (Stretch) 16 lines

Works On

Viewing:
Debian 9 (Stretch)
Same on:
Debian 10 (Buster) Debian 11 (Bullseye) Debian 12 (Bookworm) Debian 13 (Trixie) Ubuntu 18.04 LTS (Bionic Beaver) Ubuntu 20.04 LTS (Focal Fossa) Ubuntu 22.04 LTS (Jammy Jellyfish) Ubuntu 24.04 LTS (Noble Numbat)
Other versions:

Details

Size
16 lines
MD5
179f2ed4f85cbaca12fa3d69c2a4a1c3
SHA256
fcc2510172fd914ca22762c4b2dc43d36152e65becf8e84abec59f7652da5e3f
/etc/logrotate.d/apt
/var/log/apt/term.log {
  rotate 12
  monthly
  compress
  missingok
  notifempty
}

/var/log/apt/history.log {
  rotate 12
  monthly
  compress
  missingok
  notifempty
}

Copy & Paste

curl:
curl https://exampleconfig.com/api/v1/config/original/179f2ed4f85cbaca12fa3d69c2a4a1c3?hint=apt
wget:
wget -O apt https://exampleconfig.com/api/v1/config/original/179f2ed4f85cbaca12fa3d69c2a4a1c3?hint=apt

For AI Agents

<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/179f2ed4f85cbaca12fa3d69c2a4a1c3?hint=apt' /><config><app>APT</app><os>Debian 9 (Stretch)</os><location>/etc/logrotate.d/apt</location><lines>16</lines><md5>179f2ed4f85cbaca12fa3d69c2a4a1c3</md5><sha256>fcc2510172fd914ca22762c4b2dc43d36152e65becf8e84abec59f7652da5e3f</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/logrotate.d/apt
Directory
/etc/logrotate.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 apt?

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/logrotate.d/apt, replace it, then reload or restart APT.

Is apt 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.