Remove specified file inside multiple rar files?

I have 1000 .rar files, inside each rar file has 3 files

  1. ABC.jpg
  2. Abc.txt
  3. ABC.PDF
    What I am trying to do is remove
    .jpg & .txt file without extracting rar files.
    My operating system is parrotos
    (Debian) & extracting software is unrar.
    Please help me to constructed command code that can solve my problem

Something like this command

Unrar x *.rar *.jpg