  Context. Galactic cosmic rays (GCRs) and solar particles with energies
greater than tens of MeV penetrate spacecraft and instruments hosted aboard
space missions. The Solar Orbiter Metis coronagraph is aimed at observing the
solar corona in both visible (VL) and ultraviolet (UV) light. Particle tracks
are observed in the Metis images of the corona. An algorithm has been
implemented in the Metis processing electronics to detect the VL image pixels
crossed by cosmic rays. This algorithm was initially enabled for the VL
instrument only, since the process of separating the particle tracks in the UV
images has proven to be very challenging.
  Aims. We study the impact of the overall bulk of particles of galactic and
solar origin on the Metis coronagraph images. We discuss the effects of the
increasing solar activity after the Solar Orbiter mission launch on the
secondary particle production in the spacecraft.
  Methods. We compared Monte Carlo simulations of GCRs crossing or interacting
in the Metis VL CMOS sensor to observations gathered in 2020 and 2022. We also
evaluated the impact of solar energetic particle events of different
intensities on the Metis images.
  Results. The study of the role of abundant and rare cosmic rays in firing
pixels in the Metis VL images of the corona allows us to estimate the
efficiency of the algorithm applied for cosmic-ray track removal from the
images and to demonstrate that the instrument performance had remained
unchanged during the first two years of the Solar Orbiter operations. The
outcome of this work can be used to estimate the Solar Orbiter instrument's
deep charging and the order of magnitude for energetic particles crossing the
images of Metis and other instruments such as STIX and EUI.
