When in Doubt, Try to Upgrade Your Software Packages

Yihui Xie 2017-05-17

I have said this many times in several GitHub issues and it is also the very first FAQ of knitr. It is a little exaggerative and certainly not a universal rule, but it helps a lot if you could try to upgrade everything before you report a software issue. It is even more helpful if you could also install the development version of the software and see if the problem has gone. Although it sounds like a joke, @ThePracticalDev actually has a very good point:

Changing stuff and seeing what happens

You may replace “Changing Stuff” with “Upgrading Stuff” above.

A few notes from my personal experience just for your reference and also for my future self (not meant to be a guide):

Personally I prefer using the latest versions of software packages, and I upgrade whenever possible (kind of obsessive), because I don’t want to run into old bugs that have been fixed. This is not necessarily a good choice or the right thing to do, and I don’t have evidence about whether newer or older versions are better or worse in general. Newer versions may have new bugs or changes that you hate. All I want to express in this post is that when you are in trouble, you may try to upgrade first.

P.S. A list of issues solved simply by updating packages:


  1. I guess the vast majority of R users always install and use a single version of R. ↩︎

  2. The other reason was that Joe bought me a nice Thunderbolt display that wouldn’t work with my Linux laptop. I tried for a long time, screwed up my system/BIOS a couple of times, and eventually gave up (and of course, blamed Joe secretly in my mind). In retrospect, I think macOS is the best choice for me as a software developer anyway, because it is easy to install Linux and Windows as virtual machines, whereas it is probably not worth installing macOS as a virtual machine in other systems. I don’t know if it is even possible without a physical Mac machine. ↩︎

  3. On an irrelevant note, I love everything about Stack Overflow except the toxic attitude towards newcomers. I’ll write about this in a future post. ↩︎

  4. Comparing all these kinds of pain, installing MikTeX on Windows may be the only thing that is not painful. ↩︎