-
Notifications
You must be signed in to change notification settings - Fork 2
/
teams_cache_cleanup
executable file
·46 lines (41 loc) · 996 Bytes
/
teams_cache_cleanup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
PROG="${0##*/}"
if [ -z "${HOME}" ];
then
if [ -z "${USER}" ]
then
USER="$(whoami)"
fi
HOME="~${USER}"
fi
TDIR="${HOME}/.config/Microsoft/Microsoft Teams"
if [ ! -d "${TDIR}" ]
then
echo "${PROG} - fatal"
echo "Microsoft Teams data folder not found in:"
echo " ${TDIR}"
exit 1
fi
if [ -z "$1" ]
then
rmarg="-riv" # "i" for confirmation; "v" for verbose; "f" for force
elif [ "$1" = "force" ]
then
rmarg="-rvf"
else
echo "unknown option: ${1}"
echo "${PROG} [force]"
echo " [force] - forces removal of all cached items with no interaction"
echo " [] - default is to confirm all actions"
echo ""
echo " removes cached items from Microsoft Teams install"
exit 1
fi
rm ${rmarg} "${TDIR}/IndexedDB"/*
rm ${rmarg} "${TDIR}/Application Cache/Cache"/*
rm ${rmarg} "${TDIR}/blob_storage"/*
rm ${rmarg} "${TDIR}/Cache"/*
rm ${rmarg} "${TDIR}/databases"/*
rm ${rmarg} "${TDIR}/GPUCache"/*
rm ${rmarg} "${TDIR}/Local Storage"/*
rm ${rmarg} "${TDIR}/tmp"/*