Last active
May 21, 2023 11:05
-
-
Save stephanlachnit/55e5b549e222c925a8899c8b0e1a5242 to your computer and use it in GitHub Desktop.
Clean apt-cacher-ng cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Cleans apt-cacher-ng cache | |
# SPDX-FileCopyrightText: 2022 Stephan Lachnit <stephanlachnit@debian.org> | |
# SPDX-License-Identifier: 0BSD | |
systemctl stop apt-cacher-ng | |
rm -rf /var/lib/apt/* | |
rm -rf /var/cache/apt/* | |
rm -rf /var/cache/apt-cacher-ng/ | |
mkdir -p /var/cache/apt-cacher-ng/{headers,import,packages,private,temp} | |
chown apt-cacher-ng:apt-cacher-ng -R /var/cache/apt-cacher-ng | |
systemctl start apt-cacher-ng | |
systemctl status apt-cacher-ng |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment