Got a stubborn capslock, e.g. in a VM?
xdotool key Caps_Lock
or the more convoluted, but that likely doesn't require installing additional software:
python3 -c 'from ctypes import *; X11 = cdll.LoadLibrary("libX11.so.6"); display = X11.XOpenDisplay(None); X11.XkbLockModifiers(display, c_uint(0x0100), c_uint(2), c_uint(0)); X11.XCloseDisplay(display)'