Cydia... updates won't install... (error messages inside)

My iPhone 3G is behaving very erratically again....

I checked Cydia to see if there's any app updates and it's showing as 5 of them... I go to changes and click upgrade, next screen lists the following:

Install NES
Upgrade.. BossPrefs, Five Icon Dock, SBSettings, SBSettings toggles, weathericon.

I press confirm, it goes to black screen "running", "downloading", and bam... get the following messages...

the first one is too quick to read but the second says: "error... Sub-process /usr/bin/dkpg returned an error code (1)"

I click okay and it displays: "/var/cache/apt/archives/com.zdziarski.nesapp_2..4_iphoneos-ar.deb (in bold)
trying to overwrite '/Application/NES.app/a.png', which is also in package com.nervegas.nes3"

then the option to restart springboard which I do and the same thing happens again... also whatever has happened recently, I occassionally find my iphone in safe mode.

Any ideas? Thanks

Michael x
Rejailbreak your iPhone. Make sure to restore as new when doing so.
You dont have to rebreak

Do the exact same thing to recreate the error
Once you have the error on the screen that tells you the deb its trying to install, copy that file to your tmp folder on the phone (in your case the /var/cache/apt/archives/com.zdziarski.nesapp_2..4_iphoneos-ar.deb file) rename is to something easy like 1.deb.
Now go in and run dpkg -i --force-overwrite 1.deb
This will override the errors and install, now next time you go to cydia it will not try and reinstall it.
Like fallingsenses stated re-jailbreak your phone from new.
i did what kdrendel said and it fixed my problem

dont restore because you dont have just do what kdrendel said

and thanks btw

Original thread: https://forums.imore.com/threads/cydia-updates-wont-install-error-messages-inside.175947/