When you join a Teamwork project or link a Drawing from an external project, local copies of that project and of its libraries are created on your hard drive.
Local data are stored in your Local Data Folder, which by default is located in the “GRAPHISOFT” folder, under your user data, on your hard drive.
All data from all Teamwork projects, regardless of the ArchiCAD version they are in, are saved to this one location.
See also Save Local Copy.
When you Leave a Teamwork project, the local data for that project are deleted automatically. The problem of unneeded data only arises for projects that you remain joined into.