I had an issue today installing the new YouTube 2.0.26 app on my rooted HTC Desire (with ClockworkMod recovery) – the phone would report Package file was not signed correctly when I stayed on the app’s market page when downloading. This error means that a version of this app already exists on the phone but the update’s digital signature is not the same.

Removing the app with Titanium Backup still gave the same error when installing from the market, which meant that the original YouTube app was still present on the phone. Searching for “YouTube” dug up the app installed to the /system directory:

# find / -name "*YouTube*"

However it couldn’t be deleted from the /system partition while it was mounted read only.

# rm /system/app/YouTube.apk
rm: remove '/system/app/YouTube.apk'? y
rm: can't remove '/system/app/YouTube.apk': Read-only file system

So reboot the phone into recovery mode (as root) and check to see which partitions were mounted.

~ # df -h
Filesystem                Size      Used Available Use% Mounted on
tmpfs                   199.4M         0    199.4M   0% /dev
/dev/block/mtdblock4     40.0M     20.3M     19.7M  51% /cache

No sign of /system - mount it and delete the file.

~ # mount /system
~ # rm /system/app/YouTube.apk

After booting back into the OS the new application installed correctly.