Cannot remove OpenEMR

rdh61 wrote on Friday, August 29, 2014:

Hi,

I wish to remove OpenEMR from a computer I was testing it on. OS is Lubuntu 14.04. Removal with Synaptic fails. With a terminal I get:

eilene@lubuntu-ibookg4:~$ sudo dpkg -r openemr
(Reading database … 160062 files and directories currently installed.)
Removing openemr …
grep: /etc/openemr/openemr.conf: No such file or directory
grep: /etc/openemr/openemr.conf: No such file or directory
sed: can’t read /etc/apache2/httpd.conf: No such file or directory
dpkg: error processing openemr (–remove):
subprocess installed pre-removal script returned error exit status 2
postinst asked to do abort-remove
Errors were encountered while processing:
openemr

I’d appreciate help removing the software.

Many thanks.

fsgl wrote on Friday, August 29, 2014:

Try:
sudo apt-get remove openemr

rdh61 wrote on Saturday, August 30, 2014:

Thanks but same result with same errors.

BTW, the following line at the end of the output (see my previous post above) got cut off with my copy and paste:

“Sub-process /usr/bin/dpkg returned an error code (1)”

fsgl wrote on Saturday, August 30, 2014:

Try:
sudo apt-get purge openemr

Or:
sudo aptitude purge openemr

For more information on the topic, see this thread.

Consider using Brady’s package for the next installation. It’s fairly easy to remove with the apt-get command.

fsgl wrote on Sunday, August 31, 2014:

Found Brady’s post about removing OpenEMR.

I’ve always had a tough time with uninstall of OpenEMR in the past & had to resort to restoring a system image with everything except OpenEMR. The restore takes only 20 minutes but the updates take a long time because of my slow Internet connection.

More efficient to restore a system image than to remove each file manually.

bradymiller wrote on Sunday, August 31, 2014:

Hi Robert,

It appears you have installed the OpenEMR ubuntu package previously (or else it would not have tried to remove it via apt-get). If that is the case, you should of had the /etc/openemr/openemr.conf file. Installing and removing the ubuntu package should be simple as fsgl points out above. What i suspect is that your install of the openemr ubuntu package may not of worked and then you installed openemr via generic linux install. In this case removing a broken openemr ubuntu package becomes a little more complicated (since need to manually remove the broken ubuntu package tracker items) per fsgl’s link in above post.

-brady
OpenEMR

rdh61 wrote on Monday, September 01, 2014:

OK, thanks guys. All the commands suggested by fsgl produced the same result i.e. failed uninstall with same errors. I feel uneasy about doing a system restore.

Brady, what happened was this. Openemr was installed on a computer I shared with my domestic partner, each with our own account. I wanted to set it up for her use alone, and deleted my own account. Only afterwards did I realise I needed to remove openemr. Maybe that has something to do with the missing openemr.conf file?

When I get a moment I’ll follow your instructions per fsgl’s link, then feed back.

fsgl wrote on Monday, September 01, 2014:

There was a change to the .conf file as described here. I wonder if you rolled back that change, would the remove commands work.

If it’s impossible to fix the corrupted file(s), reinstallation of Lubuntu 14.04 may be the cleanest way to get rid of OpenEMR & your home directory.

Having a system image is one more backup tool to increase redundancy. I would be happy to provide a step-by-step guide if you so wish. Perhaps the following would be more in your comfort zone.

This Wiki article describes how to reinstall while preserving the other user’s home directory at the same time. If all applications with the exception of OpenEMR are reinstalled, you’re all set. If that is not the case, there is yet another option.

Linux Mint has a utility, mintBackup, that will restore the home directory and desired applications with a reinstall of the operating system. This option allows a user to choose which packages to reinstall. How to install mintBackup in Ubuntu.

rdh61 wrote on Tuesday, September 02, 2014:

Thank you very much for your kind offer fsgl, but installation of lubuntu on that old iBook was NOT straightforward or easy, and I have no desire to reinstall! I’d rather leave unnecessary packages on the system - I can’t see them doing any harm.

However, I have followed Brady’s instructions (your link) on removing openemr manually, and believe I have succeeded, except one thing which was unclear to me. In his instructions he says:

“and then yank the openemr mysql database”

Where can I find it to yank it?

Thanks again.

fsgl wrote on Tuesday, September 02, 2014:

It’s in var/lib/mysql/openemr.

For future reference, you may wish to consider Lint Mint. When Windows XP became obsolete, the consensus in the Forums was that LM is the best Linux replacement for its ease of use.

rdh61 wrote on Wednesday, September 03, 2014:

Couldn’t find the database there. I guess it must have already got deleted in one of the steps I’ve taken. I have also done a file search with Catfish, which produced a list of about 10 further files with openemr in the name, all now deleted.

Thanks for the tip about Linux Mint. Is there a lightweight version?

blankev wrote on Wednesday, September 03, 2014:

There is a lightweight version for XAMPP For Linux. A 2G sticky can do my version of OpenEMR in XAMPP in Windows7. From the USB stick it is rather slow, so I don’t know it the light weight version XAMPP for Linux from the harddisk will do a better job.

I don’t think “OpenEMR XAMPP for windows” as can be found on the download pages, will run on Linux Mint, but probably it will run under Wine for Linux.

Lot of IF THEN ELSE, but if you want free and lightweight this might give a solution.

blankev wrote on Wednesday, September 03, 2014:

Stupid me! I could test it on my own Wine Linux Mint version. Tonight if I can find some time I do a test, and will let you know the results.

So nice to have OpenEMR on a sticky, you can take it everywhere and only need a computer, most of the time ANY COMPUTER!

fsgl wrote on Wednesday, September 03, 2014:

Xfce is the lightweight version.

I installed Mate on the ancient Dell desktop with 512 MB of RAM & it works just fine.

I’ll go out on a limb to bet that Eilene would prefer LM wallpapers & themes to those from Ubuntu. I don’t think Canonical folks ever stepped inside an art museum in their entire collective lives.

fsgl wrote on Wednesday, September 03, 2014:

1 GB RAM upgrade is about $25.00 from Amazon.

Seems much easier to upgrade an i-Book than an Acer netbook.
[[embed url=https://www.youtube.com/watch?v=dybArL0EJ50]]