Esta é a mensagem de erro completa e você nos deu apenas duas linhas (negrito na mensagem abaixo)
Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: avg2012lms* 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 157 MB disk space will be freed. Do you want to continue? [Y/n] (Reading database ... 515099 files and directories currently installed.) Removing avg2012lms (2012.1795) ... Failed to stop avgd.service: Unit avgd.service not loaded. invoke-rc.d: initscript avgd, action "stop" failed. dpkg: error processing package avg2012lms (--purge): subprocess installed pre-removal script returned error exit status 5 Errors were encountered while processing: avg2012lms E: Sub-process /usr/bin/dpkg returned an error code (1)
Um erro semelhante pode ocorrer quando você instala o pacote. Em outras palavras, a coisa toda não estava sendo executada.
Portanto
Abra o arquivo /var/lib/dpkg/info/avg2012lms.prerm
sudo nano /var/lib/dpkg/info/avg2012lms.prerm
e substitua isso
case "$1" in
remove|deconfigure|upgrade)
if which invoke-rc.d >/dev/null 2>&1; then
invoke-rc.d avgd stop
else
/etc/init.d/avgd stop
fi
com isso
case "$1" in
remove|deconfigure|upgrade)
# if which invoke-rc.d >/dev/null 2>&1; then
# invoke-rc.d avgd stop
# else
# /etc/init.d/avgd stop
# fi
e agora novamente
sudo apt-get remove --purge avg2012lms
sudo apt-get install --reinstall ubuntu-desktop
Finalmente, você deve procurar executar avgd
process e matá-los.