From 24e2b581fbcbd6dc60187c2423c87e123f87090d Mon Sep 17 00:00:00 2001 From: Kazunori Kimura Date: Wed, 24 May 2023 20:26:06 +0900 Subject: [PATCH 1/2] Use `purge` instead to uninstall unused db clients Instead of `remove` that does not remove actual files. Co-authored-by: @f-io --- assets/runtime/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/runtime/functions b/assets/runtime/functions index 4b020075..45e70b5d 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -239,7 +239,7 @@ gitlab_uninstall_unused_database_client() { # remove unused client using regex above UNUSED_DB_CLIENTS=$(apt-cache pkgnames postgresql-client | grep -v -e "${REGEX_DB_CLIENT_VERSIONS_IN_USE}" | tr '\n' ' ') echo "- Uninstalling unused client(s): ${UNUSED_DB_CLIENTS}" - DEBIAN_FRONTEND=noninteractive apt-get -qq remove -- ${UNUSED_DB_CLIENTS} >/dev/null + DEBIAN_FRONTEND=noninteractive apt-get -qq purge -- ${UNUSED_DB_CLIENTS} >/dev/null fi } From 598a6666932ab1a703efc1c8f99ec70701b11d77 Mon Sep 17 00:00:00 2001 From: Kazunori Kimura Date: Thu, 25 May 2023 12:44:32 +0900 Subject: [PATCH 2/2] Add `-y` option on uninstalling unused db client Co-authored-by: Steven Achilles Co-authored-by: @f-io --- assets/runtime/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/runtime/functions b/assets/runtime/functions index 45e70b5d..e445c913 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -239,7 +239,7 @@ gitlab_uninstall_unused_database_client() { # remove unused client using regex above UNUSED_DB_CLIENTS=$(apt-cache pkgnames postgresql-client | grep -v -e "${REGEX_DB_CLIENT_VERSIONS_IN_USE}" | tr '\n' ' ') echo "- Uninstalling unused client(s): ${UNUSED_DB_CLIENTS}" - DEBIAN_FRONTEND=noninteractive apt-get -qq purge -- ${UNUSED_DB_CLIENTS} >/dev/null + DEBIAN_FRONTEND=noninteractive apt-get -qq -y purge -- ${UNUSED_DB_CLIENTS} >/dev/null fi }