diff --git a/bash/apt.sh b/bash/apt.sh new file mode 100644 index 0000000..e83ccc1 --- /dev/null +++ b/bash/apt.sh @@ -0,0 +1,3 @@ +function apt_clean_cache { + apt-get clean +} diff --git a/bash/ovh-rescue.sh b/bash/ovh-rescue.sh index cd7f899..bfe0bf2 100644 --- a/bash/ovh-rescue.sh +++ b/bash/ovh-rescue.sh @@ -41,6 +41,8 @@ fr_FR.UTF-8 UTF-8 debian_disable_frontend # install packages apt-get install --assume-yes "${packages[@]}" + # + apt_clean_cache } function ovh-rescue-install { @@ -69,13 +71,17 @@ function ovh-rescue-install { debian_disable_frontend # upgrade packages apt-get upgrade --assume-yes + # + apt_clean_cache # install packages apt-get install --assume-yes "${packages[@]}" + # + apt_clean_cache # install backports apt-get install --assume-yes \ --target-release "${release}-backports" "${backports[@]}" - # clean cache - apt-get clean + # + apt_clean_cache } function ovh-rescue-upload {