#!/bin/sh # # @license http://www.gnu.org/licenses/gpl.html GPL Version 3 # @author Volker Theile # @author OpenMediaVault Plugin Developers # @copyright Copyright (c) 2015 OpenMediaVault Plugin Developers # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . set -e . /etc/default/openmediavault . /usr/share/openmediavault/scripts/helper-functions export LANG=C echo "1. Cleaning apt cache files..." /usr/bin/apt-get clean echo "\n2. Clearing available dpkg packages..." dpkg --clear-avail echo "\n3. Removing apt lists..." rm -rfv /var/lib/apt/lists/* echo "\n4. Purging internal cache ..." omv_purge_internal_cache echo "\n5. Removing OpenMediaVault cache packages..." rm -fv /var/cache/openmediavault/archives/* echo "\n6. Creating new OpenMediaVault packages file..." touch /var/cache/openmediavault/archives/Packages echo "\n7. Updating apt..." /usr/bin/apt-get update echo "\n8. Saving current package list..." dpkg -l | grep ^ii | awk '{print $2 "=" $3 " \\"}' > /var/cache/openmediavault/currently_installed_packages.list exit 0