How to remove a broken, non repairable, package

Asked by Ricardo

Hello,
I had a problem building the fglrx driver (and opened a bug that is ongoing). Now the problem is that the package cannot be removed and each time I do something with packages, apt tries to fix it returning new errors... Is there a way to "manually" remove it? It seems to look for a library that is no longer on my system...
Below the error message got when I try to remove it:

ricky@Sala:~$ sudo apt-get purge fglrx
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze
Lettura informazioni sullo stato... Fatto
I seguenti pacchetti saranno RIMOSSI:
  fglrx
0 aggiornati, 0 installati, 1 da rimuovere e 59 non aggiornati.
1 non completamente installati o rimossi.
Dopo quest'operazione, verranno liberati 100MB di spazio su disco.
Continuare [S/n]? S
(Lettura del database... 158893 file e directory attualmente installati.)
Rimozione di fglrx...
dpkg-divert: corrispondenza errata sul pacchetto
  nel rimuovere "diversion of /usr/lib/libGL.so.1.2 to /usr/lib/fglrx/libGL.so.1.2.xlibmesa by fglrx"
  trovato "diversion of /usr/lib/libGL.so.1.2 to /usr/lib/fglrx/libGL.so.1.2.xlibmesa by xorg-driver-fglrx"
dpkg: errore nell'elaborare fglrx (--remove):
 il sottoprocesso vecchio script di post-removal ha restituito lo stato di errore 2
Elaborazione dei trigger per ureadahead...
ureadahead will be reprofiled on next reboot
Si sono verificati degli errori nell'elaborazione:
 fglrx
E: Sub-process /usr/bin/dpkg returned an error code (1)
ricky@Sala:~$

Thanks a lot!
Ricardo

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
Sam_
Solved:
Last query:
Last reply:
Revision history for this message
GREG T. (ubuntuer) said :
#1

if it is listed in snaptic package manager it can be removed .

Revision history for this message
Best Sam_ (and-sam) said :
#2
Revision history for this message
Ricardo (ricardo-rios-libero) said :
#3

Thanks Sam, that solved my question.