0

I copied the apt source directory from /var/cache/apt/archives/ on my laptop (11.10) to my work PC (11.10). I then removed /var/lib/apt/lists/*.

Now when I try to update my pc from the terminal, it shows "Failed to fetch" errors. If f use the Ubuntu update manager to install updates, it says: "waiting for unattended-upgrade to exit", but no update happens. Now it won't update anything.

4
  • What is apt source directory? Could you be more specific?
    – enzotib
    Feb 1, 2012 at 7:05
  • sorry,copy this directory : /var/cache/apt/archives/ and then remove: /var/lib/apt/lists/* and now i can't update anything
    – Netmoon
    Feb 7, 2012 at 6:55
  • Why did you remove apt/lists/? Did you follow some instructions, if so link them please. Also we assume your /etc/apt/sources.list are the same on both machines?
    – invert
    Apr 16, 2012 at 8:09
  • @Wesley: no, just i think this files not same, so i remove destination list file! i'v done that whitout any guide or manual !
    – Netmoon
    Apr 18, 2012 at 4:36

2 Answers 2

2

Go to /var/cache/apt and delete the lock file. Clear the "updates" folder. Thats it.

2
  • thank you, thats working great. can you explain further about lock file; what is it and how it work?
    – Netmoon
    Apr 18, 2012 at 4:34
  • The 'lock' file can be in /var/lib/dpkg/ directory as well. Use 'sudo rm lock' to remove the lock file in the directory.
    – sv_jan5
    Jun 15, 2016 at 14:37
0

Are you referring to the '/etc/apt/' directory, with the 'sources.list' file in it? Or the '/var/cache/apt/archives/' directory, where package archives are stored?

Can't really answer your question as to what's wrong without knowing which. If you want to update one machine from the files downloaded by apt-get off another, you're going to need to become familiar with how apt-get structures its package lists and archive files and set up a 'sources.list' file to suit, or use something like apt-mirror.

1
  • sorry,commented
    – Netmoon
    Feb 7, 2012 at 6:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .