blob: e37484bd91330f03be032e9c568eb3044f7d3fed [file] [log] [blame]
Sam Chiu81bdc652018-06-29 18:45:08 +08001#!/bin/bash
2
3function remove_cuttlefish_pkg() {
4 echo "uninstalling cuttlefish-common"
5 sudo su -c "apt-get purge cuttlefish-common -y && apt-get autoremove -y"
6}
7
8function remove_cuttlefish_usergroup() {
9 local GROUPS_TO_REMOVE=("kvm" "libvirt" "cvdnetwork")
10 echo "remove user from groups: ${GROUPS_TO_REMOVE[@]}"
11 for g in ${GROUPS_TO_REMOVE[@]};
12 do
13 sudo gpasswd -d $USER $g
14 done
15 su - $USER
16}
17
18function purge_cuttlefish(){
19 remove_cuttlefish_pkg
20 remove_cuttlefish_usergroup
21 echo 'purge cuttlefish finish!'
22}
23
24purge_cuttlefish