Is there a way to close all 2D and 3D (holographic views) apps at once on HoloLens?
Yes, they can be closed individually but some apps fall behind spatial mapping hence are beyond gaze's reach to close them. One can destroy the entire space but it is not really the best way of doing things... as the space itself is lost. And Cortana does not understand "close all apps/applications" voice command.
You can go onto the Device Portal -> Apps and it will show you all of the running apps that are on your HoloLens. You can close apps from here if they get stuck behind a wall or something, just make sure you don't close anything important like the HoloShell or Cortana.
This is essentially the HoloLens' Task Manager.
OR
if that doesn't help and you can still see the windows, but you can't see the close/adjust buttons to perform gestures on them. You can still gaze at them and say "Remove" or "Adjust" depending on what you want to do to it.
As far as closing them all at once, there is no such command.