Whenever I try to uninstall AVG or any other app this pops up:
~$ sudo dpkg -r avg2013flx
(Reading database ... 204955 files and directories currently installed.)
Removing avg2013flx (2013.3118) ...
Failed to stop avgd.service: Unit avgd.service not loaded.
invoke-rc.d: initscript avgd, action "stop" failed.
dpkg: error processing package avg2013flx (--remove):
subprocess installed pre-removal script returned error exit status 5
Errors were encountered while processing:
avg2013flx** 4 2 Answers
The problem is that the uninstall script is trying to stop the "avgd" service so that it can be uninstalled. However, the script fails and aborts if the service is not actually running at the time! You can either try to get the service to run so that it can stop (I failed at this) or you can edit the AVG supplied uninstall script.
On my system, the "pre-remove" file avg2013flx.prerm was in /var/lib/dpkg/info/.
sudo nano /var/lib/dpkg/info/avg2013flx.prermOr use whatever editor you are comfortable with and comment out or remove the lines that look like this:
if which invoke-rc.d >/dev/null 2>&1; then invoke-rc.d avgd stop
else /etc/init.d/avgd stop
fiSave the file and sudo apt-get purge avg2013flx should work to remove the package from your system.
If AVG is already installed just run this command in a terminal emulator (Ctrl+Alt+T):
sudo apt-get remove --purge avg2013flx 1