Removing configuration profiles via command line
The profiles command gives you command line access to change profiles.
To remove a profile, use
sudo profiles -R -p identifier
To get the identifier of a profile if you don't have it already, find it in the list of profiles given by
sudo profiles -P

You can't mess around in /private/var/db/ConfigurationProfiles, only macOS itself can manage files in there.