Thanks for the suggestion @amr.

Courtesy of a DBX solution engineer, the key was to remove all the files in the /var/lib/apt/lists/ directory to force apt to download fresh package lists during subsequent update.

Init Script

#!/bin/bash
set -euxo pipefail
if [[ $DB_IS_DRIVER = "TRUE" ]]; then
  # --- Clear cache
  rm -r /var/cache/apt/archives/* /var/lib/apt/lists/*
  sudo apt-get clean -y
  sudo apt-get update -y
  #---
  sudo apt-get -y update && apt-get install -y libudunits2-dev libgdal-dev libgeos-dev libproj-dev
fi
 

View solution in original post