#!/bin/bash

#用于定期清理p2p的缓存 

systemctl is-enabled apt-p2p.service >/dev/null 2>&1

if [ $? -ne 0 ];then
    echo "apt-p2p.service not enabled..."
    exit 0
fi

rm -rf /var/cache/apt-p2p/cache || true

rm /var/lib/apt/lists/localhost* || true

systemctl restart apt-p2p.service || true

exit 0