Two problems with this:
1. Even on 16.04 root folder populates with all downloaded/installed debs
2. I have aptly repo on ubuntu 14.04 and aptly cache gets deleted after 30 days
because of the /etc/cron.daily/apt cron job that has following lines:
Cache="/var/cache/apt/archives/"
eval $(apt-config shell Cache Dir::Cache::archives/d)
# sanity check
if [ -z "$Cache" ]; then <------ This is not Empty bc above returns
Cache='/'
echo "empty Dir::Cache::archives, exiting"
exit
fi
# check age
if [ ! $MaxAge -eq 0 ] && [ ! $MinAge -eq 0 ]; then
debug_echo "aged: ctime <$MaxAge and mtime <$MaxAge and ctime>$MinAge
and mtime>$MinAge"
find $Cache -name "*.deb" \( -mtime +$MaxAge -and -ctime +$MaxAge \)
-and -not \( -mtime -$MinAge -or -ctime -$MinAge \) -print0 | xargs -r -0 rm -f
elif [ ! $MaxAge -eq 0 ]; then
debug_echo "aged: ctime <$MaxAge and mtime <$MaxAge only"
find $Cache -name "*.deb" -ctime +$MaxAge -and -mtime +$MaxAge -print0
| xargs -r -0 rm -f
else
debug_echo "skip aging since MaxAge is 0"
fi
apt-config shell Cache Dir::Cache::archives/d returns
Cache='/'
So any deb files on the system, no matter where get deleted after 30
days!
I haven't changed Cache Dir::Cache::archives, so I suppose this is the
default.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/937951
Title:
An empty Dir::Cache::archives is treated incorrectly and even removes
all files in the root folder
To manage notifications about this bug go to:
https://bugs.launchpad.net/apt/+bug/937951/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs