As far as I remember, the variable `package-activated-list` is what you are looking for.

Source: [A Reddit thread][1] (retrieved today, 2018-08-28)



  [1]: https://www.reddit.com/r/emacs/comments/3qtnwo/emacs_whats_the_best_way_to_1_save_a_list_of_the/