I wanted to force run an application with nvidia graphics card but the following command gave me some errors so I thought installing drivers again might solve the issue.
DRI_PRIME=1 glxinfo | grep "OpenGL renderer" (base)
libGL error: failed to create dri screen
libGL error: failed to load driver: nouveau
OpenGL renderer string: Mesa Intel(R) UHD Graphics 620 (KBL GT2)