I would like to have available all history of software installation on my PC (Ubuntu).
But by default Ubuntu keeps 'apt-get'-logs only for last 12 months. After that time 'logrotate' will delete older logs.
To fix it you should change a file '/etc/logrotate.d/apt':
But by default Ubuntu keeps 'apt-get'-logs only for last 12 months. After that time 'logrotate' will delete older logs.
To fix it you should change a file '/etc/logrotate.d/apt':
diff --git a/logrotate.d/apt b/logrotate.d/apt
index 9a6e5d1..3021b99 100644
--- a/logrotate.d/apt
+++ b/logrotate.d/apt
@@ -7,7 +7,7 @@
}
/var/log/apt/history.log {
- rotate 12
+ rotate 1200
monthly
compress
missingok
So for now the logs will be kept during 100 years (1200 months)! :)