The aim of {shiny.destroy} is to allow inputs and modules created in a shiny application to be removed without keeping any trace of them within the realm of the shiny application.
There are two types of objects that {shiny.destroy} handles: inputs and modules.
Use the function removeInput
to remove the desired input. This is a wrapper around shiny::removeUI
, but includes ways to reference the input server-side, and updates any reactives and/or outputs that depend on that input instantly.