The Lumber Room

"Consign them to dust and damp by way of preserving them"

dpkg error: trying to overwrite X, which is also in package Y

with 20 comments

For an error like this:

dpkg: error processing /var/cache/apt/archives/AAA (--unpack):
trying to overwrite `/usr/lib/BBB', which is also in package CCC
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

(where AAA,BBB,CCC are placeholder names, in case it wasn’t clear)

sudo dpkg -i --force-overwrite AAA

(give full path of AAA), and then run

sudo apt-get -f install


Written by S

Sun, 2006-04-16 at 10:51:00

Posted in compknow

Tagged with , , , ,

20 Responses

Subscribe to comments with RSS.

  1. This actually needs a double dash, e.g. –force-overwrite, not a single dash.

    Otherwise, thanks for solving my problem :)

    Ed Greenberg

    Sun, 2006-12-03 at 13:25:02

  2. Fixed now, thanks for pointing it out. I did have two in the source, but WordPress converted it to “–“. If you notice, the same thing happened in your comment :-)
    Teaches me that <tt> tags are not a substitute for <pre>


    Sun, 2006-12-03 at 17:17:54

  3. Thanks! big help :)


    Thu, 2008-05-29 at 21:35:09

  4. Thanks! It just saved me to get my linux workspace back, after hours of wrestling with ttys. :P

    Evandro Myller

    Sun, 2009-08-23 at 19:05:32

  5. This saved me. Thanks so much!


    Mon, 2009-08-31 at 17:15:37

  6. Thank you! I was saved too! :):):)


    Wed, 2009-09-09 at 09:19:39

  7. The simple advice is still useful :) thanks a million!

    at's me

    Sat, 2010-03-06 at 01:27:04

  8. […] [via(翻墙的需要..)] 也许你对以下文章感兴趣2009-09-26 — [apt同步问题]apt-mirror: can’t chdir to skel at /usr/bin/apt-mirror line 313. (0)2009-08-20 — 用gpg(Gnu 隐私卫士)来生成自己的密钥 (2)2008-09-20 — [译文]通过Wine在Ubuntu中安装Google Chrome (1)2008-09-15 — Mozilla要求Firefox在Ubuntu中显示EULA (0)2008-06-15 — 虚拟机下架构Lamp开发环境|用debian 40r3 DVDx3制作apt源 (0)2008-06-14 — 如何架设一个Ubuntu/Debian LAMP服务器 (0)2008-03-02 — ubuntu系统安装kde4 (0)2008-02-06 — ubuntu不等于linux (0)2008-02-06 — ubuntu发布新的bt客户端-Transmission (0)2009-09-05 — wget抓大文件 +2009.9.4日记 (2) Tags: apt, apt-get, dpkg, linux, ubuntu  […]

  9. Gracias desde villahermosa,veracruz mexico. thank you

    Carlos daniel

    Wed, 2010-05-05 at 13:34:10

  10. Thx, you made my day and my config.

    Ido Deisuke

    Wed, 2010-10-20 at 06:54:23

  11. THANKS !!!!!!!!!!!!!!!!!!!!!!!! you just help my iPhone :D

    PS *in my case, before I ran your command I need to open the folder /AAA then run

    dpkg -i –force-overwrite AAA
    (no ‘sudo’)

    **sorry, i know nothing about Linux**

    thanks again :)


    Mon, 2010-11-08 at 12:05:42

  12. Thanks, worked perfectly,

    Libreoffice was giving me trouble to upgrade without this


    Fri, 2011-04-15 at 18:43:15

  13. Thanx from me too :).


    Tue, 2011-08-16 at 08:56:07

    • thank you!

      Zachary Murrell-Dowson

      Sun, 2012-03-04 at 03:36:18

  14. Thank you a ton!
    Saved my day.


    Mon, 2012-06-04 at 11:55:29

    • A big thanks from me too! I can now use Synaptic on my usb knoppix.


      Mon, 2012-10-29 at 03:44:09

  15. Thank you, that saved quite some time! \o/


    Fri, 2013-02-22 at 00:47:28

  16. Awesome. fantastic job. This saved me a lot of time. Thank you very much.


    Thu, 2015-09-10 at 13:43:56

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.