#!/usr/bin/env bash

# omarchy:summary=Prune superseded versions from the apt package cache
# omarchy:requires-sudo=true

set -e

# Based: apt-get autoclean drops the cached debs apt can no longer fetch,
# which is what paccache -rk2 did for pacman's cache.
echo -e "\e[32m\nPrune package cache\e[0m"
sudo apt-get autoclean || echo -e "\e[33mCould not prune the package cache.\e[0m" >&2
echo
