This question already has an answer here:

Yesterday, I noticed that whenever I run the command apt-get update, everything seems to work until the last step.

I get the usual output:

Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Ign:2 http://linux.dropbox.com/ubuntu xenial InRelease                                                              
Hit:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease                                                     
Ign:4 http://linux.dropbox.com/ubuntu wily InRelease                                                                
Hit:5 http://archive.canonical.com/ubuntu xenial InRelease                                                          
Hit:6 http://apt.insynchq.com/ubuntu xenial InRelease                                                               
Hit:7 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu xenial InRelease  
Hit:8 http://archive.ubuntu.com/ubuntu xenial-backports InRelease                              
Get:9 http://linux.dropbox.com/ubuntu xenial Release [6,600 B]

However, towards the end and after I get:

Fetched X kB in Ys (69.7 kB/s)

There is a long delay after which I get

Error: Timeout was reached
Reading package lists... Done

What is causing this? How can I fix this issue?

Distributor ID: Ubuntu
Description:    Ubuntu 16.04 LTS
Release:    16.04
Codename:   xenial

marked as duplicate by Community May 20 '16 at 16:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


The fix for me was to kill appstreamcli. I did the following:

> ps -aux | grep appstream
root      2351  0.0  0.0  21296   956 pts/4    S+   10:03   0:00 grep --color=auto appstream
root     24008  0.0  0.0   4508   712 ?        SN   May19   0:00 sh -c if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi
root     24010 37.1  0.2 144404 38104 ?        RN   May19 281:49 appstreamcli refresh
> kill -15 24010

Finally, after running apt-get update, the output is now

Fetched 294 kB in 1s (162 kB/s)                                  
Reading package lists... Done

As expected. Thanks everyone!

  • didn't work for me, the PID is changing all the time. In spite of that, I didn't voted down. – Rho Aug 3 '17 at 12:40
  • @Rho, sorry to hear that. This is the solution that worked for me (the OP), so there is little hope that it will work the same for everyone. As for the downvote, no worries I was aware a year ago when it was downvoted. – smac89 Aug 3 '17 at 15:19
  • This is happening to me, but there is no appstreamcli... – Michael Oct 14 '18 at 22:58
  • for me it was my security policy blocking a thread clone... clone(child_stack=null, flags=clone_child_cleartid|clone_child_settid|sigchld, child_tidptr=0x7f1a9e52bed0) = 12189 wait4(12189, error: timeout was reached [{wifexited(s) && wexitstatus(s) == 0}], 0, null) = 12189 --- sigchld {si_signo=sigchld, si_code=cld_exited, si_pid=12189, si_uid=0, si_status=0, si_utime=0, si_stime=0} --- – mikejonesey Apr 3 at 18:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.