Results 1 to 8 of 8
Hi people, I have tried posting this on the Official Ubuntu forums and got some advice but none helped. Here's the deal. I installed Avast Antivirus for Linux on my ...
- 02-27-2009 #1Just Joined!
- Join Date
- Feb 2009
- Posts
- 35
[SOLVED] Crazy problems uninstalling a program. Any ideas?
Hi people, I have tried posting this on the Official Ubuntu forums and got some advice but none helped. Here's the deal. I installed Avast Antivirus for Linux on my laptop. I have done the same with my desktop and have no problem. On the laptop, I think I downloaded and installed an older version of the program, and when I tried to uninstall (using uninstall, fore remove and purge commands), I get the following messeage:
sotvomike@sotvomike-laptop:~$ sudo dpkg --force-remove-reinstreq --remove avast4workstation
dpkg - warning, overriding problem because --force enabled:
Package is in a very bad inconsistent state - you should
reinstall it before attempting a removal.
(Reading database ... 122187 files and directories currently installed.)
Removing avast4workstation ...
/var/lib/dpkg/info/avast4workstation.prerm: 4: /usr/lib/avast4workstation/share/avast/desktop/install-desktop-entries.sh: not found
dpkg: error processing avast4workstation (--remove):
subprocess pre-removal script returned error exit status 127
/var/lib/dpkg/info/avast4workstation.postinst: 4: /usr/lib/avast4workstation/share/avast/desktop/install-desktop-entries.sh: not found
dpkg: error while cleaning up:
subprocess post-installation script returned error exit status 127
Errors were encountered while processing:
avast4workstation
I can't get updates for Ubuntu because it just says that the package (avast4workstation) is in a bad state and the updater closes. So, I tried both going to the Synaptic Manager and using the purge terminal command. Both instances I got this message:
E: The package avast4workstation needs to be reinstalled, but I can't find an archive for it.
I have downloaded both the older and recent versions of the program, but when I try to insall either of them, I get the same message as above. It's the same thing every time. Synaptic won't even open at all because of it. Any ideas?
Mike
- 02-27-2009 #2
Hi and Welcome !
Execute this
Post exact error here, if any.Code:sudo apt-get clean all sudo apt-get update sudo dpkg --configure -a
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 02-27-2009 #3Just Joined!
- Join Date
- Feb 2009
- Posts
- 35
Thanks Casper! I executed the commands that you gave with no problems or errors. But all remains the same. When distribution update runs, it says avast4workstation is on a very bad state and should be reinstalled. Then it forces me to quit. Should I do something else?
- 02-27-2009 #4
Execute this
In case it doesn't work, execute thisCode:sudo apt-get remove avast4workstation
Post output here.Code:sudo apt-get check ls /var/cache/apt/archives/partial
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 02-28-2009 #5Just Joined!
- Join Date
- Feb 2009
- Posts
- 35
sotvomike@sotvomike-laptop:~$ sudo apt-get remove avast4workstation
[sudo] password for sotvomike:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package avast4workstation needs to be reinstalled, but I can't find an archive for it.
sotvomike@sotvomike-laptop:~$ sudo apt-get check
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package avast4workstation needs to be reinstalled, but I can't find an archive for it.
sotvomike@sotvomike-laptop:~$ ls /var/cache/apt/archives/partial
sotvomike@sotvomike-laptop:~$ sudo apt-get check
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package avast4workstation needs to be reinstalled, but I can't find an archive for it.
That's the same wall I keep hitting. I thought for sure that this would have worked.
- 02-28-2009 #6
Open /var/lib/dpkg/info/ folder and remove all the files related to avast4workstation.
Make sure to delete correct files using rm -rf command. A single type can hose your system.Code:cd /var/lib/dpkg/info/ ls avast* sudo rm -rf avast_file_name(s)
Execute this after deleting those file(s):
Code:sudo dpkg --remove --force-remove-reinstreq avast4workstation
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 02-28-2009 #7Just Joined!
- Join Date
- Feb 2009
- Posts
- 35
Wow! That did it! Downloading updates as I write this. Can you explain to me what happened so I don't run into the same problem again? You're the best, Casper!
- 02-28-2009 #8
Glad to help you !

/var/lib/dpkg/info folder stores post-install, pre-install and list files of almost all packages. list file has a list of all libraries, scripts and other stuff that was installed during package installation. Avast was broken and some of its files were missing but its list file was not modified according to that. It was not your fault. Problem was in Package Manager and package only. list and other files were not allowing removal of Avast. We removed all the files from info folder and package manager worked correctly.Last edited by devils casper; 02-28-2009 at 04:01 AM. Reason: typo
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First


