In a safe way remove the TeamViewer folder %USERPROFILE%\AppData\Local.Then delete the directory C:\Program Files\TeamViewer.After removing the program, press Win+R > %Appdata% > OK.Go to Add or remove programs, find TeamViewer in the list, and select Uninstall.Then install the free version of TeamViewer. If the commercial version of TeamViewer is installed, you need to remove it, clear the registry and folders from the remaining entries and files. If one user uses a free one and the second uses a commercial one, then the commercial version will consider the use of TeamViewer for commercial purposes. Make sure that you and the users you connect are using the free version of TeamViewer. If you use TeamViewer for personal use only, here’s how to fix the TeamViewer trial expired problem.
TeamViewer Versions: Trial Expiration Problem