Merge pull request #2767 from kkimurak/unused-pg-client-purge-instead-of-remove

Use `purge` instead to uninstall unused db clients
This commit is contained in:
Steven Achilles 2023-05-25 06:41:44 +02:00 committed by GitHub
commit 1724a79bf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 -y purge -- ${UNUSED_DB_CLIENTS} >/dev/null
fi
}