Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions provision/provision-helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,15 @@ export -f vvv_package_install
vvv_package_remove() {
declare -a packages=($@)

# Ensure packages are actually installed before removing them
if [ ${#packages[@]} -ne 0 ]; then
for package in "${packages[@]}"; do
if ! dpkg -s "${package}"; then
packages=("${packages[@]/$package}")
fi
done
fi

if [ ${#packages[@]} -eq 0 ]; then
vvv_info " * No packages to remove"
return 0
Expand Down