summaryrefslogtreecommitdiffstats
path: root/ci/cleanmaas.sh
blob: 40961359b72b0ba8c7a16741b30d70f6c94f599a (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

set -ex

maasver=$(apt-cache policy maas | grep Installed | cut -d ':' -f 2 | sed -e 's/^.*: //')

if [[ "$maasver" > "2" ]]; then
    echo "removing existing maas ..."
    sudo apt-get purge maas maas-cli maas-common maas-dhcp maas-dns maas-proxy maas-rack-controller maas-region-api maas-region-controller  -y
    sudo rm -rf /var/lib/maas
fi