I am trying to clear the data for a few apps on a work profile without clearing the data on the main user account for my android phone.
What I'm trying for example is :
pm clear com.Microsoft.teams
Is there a way to clear just on the work profile and not my main account?
From my research, you can't seems to specify a user for this command unlike a few other commands: pm documentation
pm help | grep clear
which showsclear [--user USER_ID] PACKAGE
--user <USER_ID>
. You just need to find out which userID your work profile has.