diff --git a/source/NerdPack/usr/local/emhttp/plugins/NerdPack/scripts/packagemanager b/source/NerdPack/usr/local/emhttp/plugins/NerdPack/scripts/packagemanager index 05c87e44..f17504c5 100755 --- a/source/NerdPack/usr/local/emhttp/plugins/NerdPack/scripts/packagemanager +++ b/source/NerdPack/usr/local/emhttp/plugins/NerdPack/scripts/packagemanager @@ -91,8 +91,11 @@ foreach ($pkg_cfg as $pkg_name => $pkg_pref) { // get preferences for each packa if (file_check_sha1($pkg_file, $pkg_sha1)) logger($pkg_gitname.' package downloaded sucessfully!', $argq); - else + else{ + if(is_file($pkg_file)) + unlink($pkg_file); logger($pkg_gitname.' package download failed!', $argq); + } } } if (!$pkg_install_status) {