MacOS – How to add/remove applications from “File and Folders” inside “Security and Privacy” -> Privacy Tab

macospermissionprivacysystem-prefs

enter image description here

How to remove these bunch of files from here.
I use VS code, when I debug a program it asks for this permission that a file that is created while debugging wants to access your Document folder. And every time I have to allow it and then those files end up in Privacy -> "Files and Folders".

enter image description here

Best Answer

Run

tccutil reset SystemPolicyDocumentsFolder
tccutil reset SystemPolicyDownloadsFolder
tccutil reset SystemPolicyDesktopFolder

They are case sensitive.

Sources:

If the above is too cumbersome,

tccutil rest

which resets all permissions across all profiles.

tccutil.py is outdated and even after disabling SIP, it will not give meaningful info about the database:

/Library/Application Support/com.apple.TCC/TCC.db