3
# Copyright (C) 2012,2014,2016 Etersoft
4
# Copyright (C) 2012,2014,2016 Vitaly Lipatov <lav@etersoft.ru>
6
# This program is free software: you can redistribute it and/or modify
7
# it under the terms of the GNU Affero General Public License as published by
8
# the Free Software Foundation, either version 3 of the License, or
9
# (at your option) any later version.
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU Affero General Public License for more details.
16
# You should have received a copy of the GNU Affero General Public License
17
# along with this program. If not, see <http://www.gnu.org/licenses/>.
20
__remove_alt_apt_cache_file()
22
sudocmd rm -vf /var/cache/apt/*.bin
23
sudocmd rm -vf /var/cache/apt/partial/*
24
sudocmd rm -vf /var/lib/apt/lists/*pkglist*
25
sudocmd rm -vf /var/lib/apt/lists/*release*
29
__remove_deb_apt_cache_file()
31
sudocmd rm -vf /var/cache/apt/*.bin
32
sudocmd rm -vf /var/cache/apt/archives/partial/*
33
sudocmd rm -vf /var/lib/apt/lists/*Packages*
34
sudocmd rm -vf /var/lib/apt/lists/*Release*
35
sudocmd rm -vf /var/lib/apt/lists/*Translation*
42
[ -z "$*" ] || fatal "No arguments are allowed here"
47
sudocmd apt-get clean $dryrun
48
[ -n "$direct" ] && __remove_alt_apt_cache_file || info "Use epm clean --direct to remove all downloaded indexes."
51
sudocmd apt-get clean $dryrun
52
[ -n "$direct" ] && __remove_deb_apt_cache_file || info "Use epm clean --direct to remove all downloaded indexes."
55
sudocmd aptitude clean
56
[ -n "$direct" ] && __remove_deb_apt_cache_file || info "Use epm clean --direct to remove all downloaded indexes."
60
#sudocmd yum makecache
69
sudocmd brew cleanup -s
72
sudocmd pacman -Sc --noconfirm
78
sudocmd nix-collect-garbage
83
sudocmd eopkg delete-cache
92
sudocmd xbps-remove -O
98
fatal "Have no suitable command for $PMTYPE"
101
info "Note: Also you can try (with CAUTION) '# epm autoremove' and '# epm autoorphans' commands to remove obsoleted and unused packages."