How to re-install nvjpeg plugins?

I think I was upgrading nvjpegdec to support [nvjpegdec ! ‘video/x-raw(memory:NVMM)’] for continuous motion jpeg decoding.
https://devtalk.nvidia.com/default/topic/1049311/jetson-agx-xavier/nvjpegdec-slower-then-jpegdec-in-gstreamer/post/5348034/#5348034

May be I followed in wrong way, I ended up corrupting nvjpegdec/nvjpegenc plugins.
Now system says says:

nvidia@jetson:~$ gst-inspect-1.0 nvjpegdec
No such element or plugin 'nvjpegdec'

How can I repair this damage?

System is:

nvidia@jetson:~$ gst-inspect-1.0 --version
gst-inspect-1.0 version 1.14.5
GStreamer 1.14.5
https://launchpad.net/distros/ubuntu/+source/gstreamer1.0
nvidia@jetson:~$ gst-inspect-1.0 | grep nv
ivtc:  ivtc: Inverse Telecine
libav:  avdec_twinvq: libav VQF TwinVQ decoder
libav:  avdec_dsicinvideo: libav Delphine Software International CIN video decoder
libav:  avdec_idcinvideo: libav id Quake II CIN video decoder
libav:  avdec_wnv1: libav Winnov WNV1 decoder
audiofx:  audioinvert: Audio inversion
bayer:  rgb2bayer: RGB to Bayer converter
autoconvert:  autoconvert: Select convertor based on caps
autoconvert:  autovideoconvert: Select color space convertor based on caps
rtponvif:  rtponviftimestamp: ONVIF NTP timestamps RTP extension
rtponvif:  rtponvifparse: ONVIF NTP timestamps RTP extension
debugutilsbad:  errorignore: Convert some GstFlowReturn types into others
videoconvert:  videoconvert: Colorspace converter
audioconvert:  audioconvert: Audio converter
nvdrmvideosink:  nvdrmvideosink: Nvidia Drm Video Sink
nveglglessink:  nveglglessink: EGL/GLES vout Sink
omx:  nvoverlaysink: OpenMax Video Sink
nvivafilter:  nvivafilter: NvIVAFilter Plugin
nvegltransform:  nvegltransform: NvEGLTransform
nvvideocuda:  videocuda: CUDA Post processor
nvvidconv:  nvvidconv: NvVidConv Plugin
nvtee:  nvtee: NvTee
nvvideo4linux2:  nvv4l2vp9enc: V4L2 VP9 Encoder
nvvideo4linux2:  nvv4l2h265enc: V4L2 H.265 Encoder
nvvideo4linux2:  nvv4l2h264enc: V4L2 H.264 Encoder
nvvideo4linux2:  nvv4l2decoder: NVIDIA v4l2 video decoder
nveglstreamsrc:  nveglstreamsrc: nVidia EGL Stream
nvarguscamerasrc:  nvarguscamerasrc: NvArgusCameraSrc
nvcompositor:  nvcompositor: NvCompositor
nvvideosink:  nvvideosink: nVidia Video Sink

My jpegenc/jpegdec was also got corrupted. But then I re-install it with

sudo apt-get install gstreamer1.0-tools gstreamer1.0-alsa \
 gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
 gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
 gstreamer1.0-libav

Hi,
Since r31.1 is developer preview, we would suggest you upgrade to r32 releases.
The patch is verified on r32.1 and may not work properly on r31.1.

Ok, I understood.
But how can I get the default nvjpegdec/nvjpegenc back?

Would uninstalling and reinstalling the gstreamer would work? If yes, then what is the appropriate way to do this?

You can find which deb packages provide the files in question using dpkg -S, then reinstall them:

$ dpkg -S /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvjpeg.so
nvidia-l4t-gstreamer: /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvjpeg.so
$ sudo apt --reinstall install nvidia-l4t-gstreamer
$ dpkg -S /usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
nvidia-l4t-multimedia: /usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
$ sudo apt --reinstall install nvidia-l4t-multimedia
$ dpkg -S /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstjpeg.so
gstreamer1.0-plugins-good:arm64: /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstjpeg.so
...

Deleting the cached GStreamer registry also helps:

rm -rf ~/.cache/gstreamer-1.0/registry.aarch64.bin