learnr uses a couple strategies to store users' previous answers so that they can restored when they return to a tutorial. learnr calls this Tutorial Storage and the default behavior is to use the storage mechanisms provided by browsers to have the user's browser keep track of the code or questions that were last entered.
The learnr documentation describes this in the Tutorial Storage page. There you can also find the code required to set up a storage system which I've simplified into a no-op storage strategy. You can put the code below in the setup
chunk of your tutorial and every time you re-load the tutorial it should re-start without restoring any previous answers.
options(tutorial.storage = list(
save_object = function(...) { },
get_object = function(...) NULL,
get_objects = function(...) list(),
remove_all_objects = function(...) { }
)
Note: this answer was derived from Is it possible to configure learnr to always forget previous attempts · Issue #607 · rstudio/learnr.