diff --git a/.travis.yml b/.travis.yml
index d1fbb7152042afd8356ea1df5ca9d50ac9ad2559..20d6fe0fb12f40ccf0136556f9ec838bb112ff9d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,8 +3,8 @@ before_install:
   - sudo add-apt-repository ppa:yjwong/gflags -y
   - sudo add-apt-repository ppa:h-rayflood/llvm -y
   - sudo add-apt-repository ppa:ondrej/php5-5.6 -y
-  - sudo apt-get dist-upgrade -qq
   - sudo apt-get update -qq
+  - sudo apt-get dist-upgrade -qq
   - sudo apt-get install -qq libgtest-dev libgflags-dev python-virtualenv clang-3.5 php5-dev
   - sudo pip install cpp-coveralls
 env: