Updating GitLab CE 8.9.5 to latest version from one-click install

Posted January 24, 2017 4k views
UbuntuDigitalOcean 1-Click Apps Marketplace


I’m trying to get the latest version of GitLab on my droplet. Initially, I installed GitLab from the One-Click Install. I followed some instructions from this question, but I keep getting the same error in my console:

W: Duplicate sources.list entry trusty/main amd64 Packages (/var/lib/apt/lists/packages.gitlab.com_gitlab_gitlab-ce_ubuntu_dists_trusty_main_binary-amd64_Packages)
W: Duplicate sources.list entry trusty/main i386 Packages (/var/lib/apt/lists/packages.gitlab.com_gitlab_gitlab-ce_ubuntu_dists_trusty_main_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems

The droplet is running Ubuntu 14.04. Let me know what information I should also provide.

Best regards,

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers


From the CLI, run uname -m to get your arch. You should see either x86_64 or i386.

Once you know what arch you’re running, all you need to do is remove the line that doesn’t match it and then run apt-get update again to sync the packages for your distro.

Normally the sources.list file is in /etc/apt, though you may need to look in




… since that’s where the error is pointing.

  • Thank you for your quick response! I went through the sources.list file and I could not find anything related to gitlab packages in there. See the below the content of the file (I deleted the comments) :

    deb trusty main restricted
    deb-src trusty main restricted
    deb trusty-updates main restricted
    deb-src trusty-updates main restricted
    deb trusty universe
    deb-src trusty universe
    deb trusty-updates universe
    deb-src trusty-updates universe
    deb trusty multiverse
    deb-src trusty multiverse
    deb trusty-updates multiverse
    deb-src trusty-updates multiverse
    deb trusty-backports main restricted universe multiverse
    deb-src trusty-backports main restricted universe multiverse
    deb trusty-security main
    deb-src trusty-security main
    deb trusty-security universe
    deb-src trusty-security universe

    I looked in the folders you suggested, the packages are there, but no .list files…
    I am kind of confused… am I supposed to find another sources.list file somewhere?

    Again, thank you very much for your help!

    • @danickgevry

      Do you have a directory named sources.list.d by chance? If so, the add-on packages may be in there as their own list file.

      What we can do is use grep to speed this up a bit. From the command line we can run:

      grep -rnw '/var/lib/apt' -e ''

      We can also run that in the standard directory to see if they exist there:

      grep -rnw '/etc/apt' -e ''

      When you run those commands, if that URI exists in any file, you’ll see something like:

      /etc/apt/sources.list:12:deb-src xenial main restricted

      NOTE: In the above, I searched for deb-src, this is just an example of what you may see.

      If a file is returned and does indeed contain duplicates, the file is the path in the output, or in this case:


      So if I was trying to find what you were looking for and that’s the file I was given, that’s where I’d look.

      • Thank you! So there was 2 files in sources.list.d related to gitlab packages. one was gitlab-ce.list and the other gitlab_gitlab-ce.list. All I had to do was comment the only line in the first file.

        Now, when I try to update gitlab-ce, I get this error :

        Errno::ENOMEM: Cannot allocate memory - whoami

        I was running on a 1 GB / 1 CPU droplet, so I will try to resize to a 2 GB / 2 CPU see if it helps. Gitlab was kind of slow, so I knew I would have to upgrade the server anyway.

        I’ll let you know once thats done and if I get any other issues.

        Thanks so much!

        • So yea, its working now. I was able to update GitLab without any issue. Looking at the graphs, I feel like the 2 GB / 2 CPU might not even be enough. I only have gitlab running on this droplet and the the memory usage sticks to 87%. What do you think?

          Anyway, I’ll keep an eye on this. Thank you for you help @jtittle ! Much appreciated !

          • @danickgevry

            No problem at all, always happy to help!

            As for Droplet size, IIRC, a 1GB can handle GitLab though 2GB is what’d I’d use. It should be more than capable of handling low-medium activity.

            If there’s a large number of active users/accounts and lots of code pushing, you may be better off with the 4GB Droplet, though it really depends on what you’re using to gauge RAM utilization.

            Using top won’t provide clear results. To get a real read on RAM usage, you can run:

            free -mh

            Which is basically a command that tells you how much RAM is really used, how much is cached, how much is buffered, etc.