Mailing List Archive

complete uninstall and reinstall on Ubuntu 20.04
I know that when I install MythTV on an Ubuntu 20.04 machine it does
everything for me in regards to database, Mythweb, passwords and config
files. However using apt remove --purge doesn't remove everything.

What else do I need to delete to make the mythtv-setup start all over
again? I've tried removing the /etc/mythtv directory and the
/home/$USER/.mythtv directory. I must be missing something.

Maybe the mariadb database is still there???

Jim A
Re: complete uninstall and reinstall on Ubuntu 20.04 [ In reply to ]
On Mon, Nov 01, 2021 at 03:33:19PM -0400, James Abernathy wrote:
> I know that when I install MythTV on an Ubuntu 20.04 machine it does
> everything for me in regards to database, Mythweb, passwords and config
> files. However using apt remove --purge doesn't remove everything.
>
> What else do I need to delete to make the mythtv-setup start all over
> again? I've tried removing the /etc/mythtv directory and the
> /home/$USER/.mythtv directory. I must be missing something.
>
> Maybe the mariadb database is still there???
>

Quite possible, as it may be difficult for the package to know
which database is associated with it; I can think of a couple of
cases where the wrong database might get removed unless the package
checks with the user first.

You can see all the actions that 'remove' and 'purge' will take
by looking at the 'prerm' and 'postrm' scripts for the package.
They should be named /var/lib/dpkg/info/<packagename>.{prerm,postrm}.

What do you see if you run "sudo mysql -e 'show databases'" ?

HTH
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: complete uninstall and reinstall on Ubuntu 20.04 [ In reply to ]
On Mon, Nov 1, 2021 at 5:44 PM <lists@arewethere.net> wrote:

> On Mon, Nov 01, 2021 at 03:33:19PM -0400, James Abernathy wrote:
> > I know that when I install MythTV on an Ubuntu 20.04 machine it does
> > everything for me in regards to database, Mythweb, passwords and config
> > files. However using apt remove --purge doesn't remove everything.
> >
> > What else do I need to delete to make the mythtv-setup start all over
> > again? I've tried removing the /etc/mythtv directory and the
> > /home/$USER/.mythtv directory. I must be missing something.
> >
> > Maybe the mariadb database is still there???
> >
>
> Quite possible, as it may be difficult for the package to know
> which database is associated with it; I can think of a couple of
> cases where the wrong database might get removed unless the package
> checks with the user first.
>
> You can see all the actions that 'remove' and 'purge' will take
> by looking at the 'prerm' and 'postrm' scripts for the package.
> They should be named /var/lib/dpkg/info/<packagename>.{prerm,postrm}.
>
> What do you see if you run "sudo mysql -e 'show databases'" ?
>
> HTH
>

I can't look right now. I have a bad habit of guessing if it takes more
than 30 minutes to figure something out, I can reinstall Ubuntu and
rebuild everything quicker. I have it down to a science. I can reinstall in
10 minutes and install mythtv in 10 minutes via ppa. Compiling from source
will take about 15.

Jim A
Re: complete uninstall and reinstall on Ubuntu 20.04 [ In reply to ]
On Mon, 1 Nov 2021 15:33:19 -0400, you wrote:

>I know that when I install MythTV on an Ubuntu 20.04 machine it does
>everything for me in regards to database, Mythweb, passwords and config
>files. However using apt remove --purge doesn't remove everything.
>
>What else do I need to delete to make the mythtv-setup start all over
>again? I've tried removing the /etc/mythtv directory and the
>/home/$USER/.mythtv directory. I must be missing something.
>
>Maybe the mariadb database is still there???
>
>Jim A

You also need to remove /var/lib/mythtv, as there are changed files
there (database backups at least).

I would think that there would be user data in the MySQL/MariaDB
system tables also, even if the mythconverg database is purged. To
delete that you would need to know what users were created for use
with mythconverg. So do this:

sudo mysql
SELECT User, Db, Host from mysql.db where Db='mythconverg';
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: complete uninstall and reinstall on Ubuntu 20.04 [ In reply to ]
On 11/1/21 9:28 PM, Stephen Worthington wrote:
> On Mon, 1 Nov 2021 15:33:19 -0400, you wrote:
>
>> I know that when I install MythTV on an Ubuntu 20.04 machine it does
>> everything for me in regards to database, Mythweb, passwords and config
>> files. However using apt remove --purge doesn't remove everything.
>>
>> What else do I need to delete to make the mythtv-setup start all over
>> again? I've tried removing the /etc/mythtv directory and the
>> /home/$USER/.mythtv directory. I must be missing something.
>>
>> Maybe the mariadb database is still there???
>>
>> Jim A
> You also need to remove /var/lib/mythtv, as there are changed files
> there (database backups at least).
>
> I would think that there would be user data in the MySQL/MariaDB
> system tables also, even if the mythconverg database is purged. To
> delete that you would need to know what users were created for use
> with mythconverg. So do this:
>
> sudo mysql
> SELECT User, Db, Host from mysql.db where Db='mythconverg';

I just did this command on my production backend and I assume it would
be the same on my test system.

mysql> SELECT User, Db, Host from mysql.db where Db='mythconverg';
+--------+-------------+------+
| User   | Db          | Host |
+--------+-------------+------+
| mythtv | mythconverg | %    |
+--------+-------------+------+
1 row in set (0.02 sec)

Jim A


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: complete uninstall and reinstall on Ubuntu 20.04 [ In reply to ]
On Tue, 2 Nov 2021 05:10:38 -0400, you wrote:

>
>On 11/1/21 9:28 PM, Stephen Worthington wrote:
>> On Mon, 1 Nov 2021 15:33:19 -0400, you wrote:
>>
>>> I know that when I install MythTV on an Ubuntu 20.04 machine it does
>>> everything for me in regards to database, Mythweb, passwords and config
>>> files. However using apt remove --purge doesn't remove everything.
>>>
>>> What else do I need to delete to make the mythtv-setup start all over
>>> again? I've tried removing the /etc/mythtv directory and the
>>> /home/$USER/.mythtv directory. I must be missing something.
>>>
>>> Maybe the mariadb database is still there???
>>>
>>> Jim A
>> You also need to remove /var/lib/mythtv, as there are changed files
>> there (database backups at least).
>>
>> I would think that there would be user data in the MySQL/MariaDB
>> system tables also, even if the mythconverg database is purged. To
>> delete that you would need to know what users were created for use
>> with mythconverg. So do this:
>>
>> sudo mysql
>> SELECT User, Db, Host from mysql.db where Db='mythconverg';
>
>I just did this command on my production backend and I assume it would
>be the same on my test system.
>
>mysql> SELECT User, Db, Host from mysql.db where Db='mythconverg';
>+--------+-------------+------+
>| User?? | Db????????? | Host |
>+--------+-------------+------+
>| mythtv | mythconverg | %??? |
>+--------+-------------+------+
>1 row in set (0.02 sec)
>
>Jim A

Right, so you would need to do a "DROP USER 'mythtv'@'%';" command.
That also deletes all the GRANTs for that user.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: complete uninstall and reinstall on Ubuntu 20.04 [ In reply to ]
On Tue, Nov 2, 2021 at 5:55 AM Stephen Worthington <stephen_agent@jsw.gen.nz>
wrote:

> On Tue, 2 Nov 2021 05:10:38 -0400, you wrote:
>
> >
> >On 11/1/21 9:28 PM, Stephen Worthington wrote:
> >> On Mon, 1 Nov 2021 15:33:19 -0400, you wrote:
> >>
> >>> I know that when I install MythTV on an Ubuntu 20.04 machine it does
> >>> everything for me in regards to database, Mythweb, passwords and config
> >>> files. However using apt remove --purge doesn't remove everything.
> >>>
> >>> What else do I need to delete to make the mythtv-setup start all over
> >>> again? I've tried removing the /etc/mythtv directory and the
> >>> /home/$USER/.mythtv directory. I must be missing something.
> >>>
> >>> Maybe the mariadb database is still there???
> >>>
> >>> Jim A
> >> You also need to remove /var/lib/mythtv, as there are changed files
> >> there (database backups at least).
> >>
> >> I would think that there would be user data in the MySQL/MariaDB
> >> system tables also, even if the mythconverg database is purged. To
> >> delete that you would need to know what users were created for use
> >> with mythconverg. So do this:
> >>
> >> sudo mysql
> >> SELECT User, Db, Host from mysql.db where Db='mythconverg';
> >
> >I just did this command on my production backend and I assume it would
> >be the same on my test system.
> >
> >mysql> SELECT User, Db, Host from mysql.db where Db='mythconverg';
> >+--------+-------------+------+
> >| User | Db | Host |
> >+--------+-------------+------+
> >| mythtv | mythconverg | % |
> >+--------+-------------+------+
> >1 row in set (0.02 sec)
> >
> >Jim A
>
> Right, so you would need to do a "DROP USER 'mythtv'@'%';" command.
> That also deletes all the GRANTs for that user.
>

So at this point the user is gone, what about mythconverg database itself?

BTW, just testing this on a test system.

sudo apt remove --purge mythtv
removes /var/lib/mythtv
leaves /var/log/mythtv/*.log
leaves /etc/mythtv/*
leaves /home/jim/.mythtv
leaves /home/mythtv/.mythtv
leaves /home/mythtv/.xmltv
Re: complete uninstall and reinstall on Ubuntu 20.04 [ In reply to ]
On Tue, Nov 2, 2021 at 6:13 AM James Abernathy <jfabernathy@gmail.com>
wrote:

>
>
> On Tue, Nov 2, 2021 at 5:55 AM Stephen Worthington <
> stephen_agent@jsw.gen.nz> wrote:
>
>> On Tue, 2 Nov 2021 05:10:38 -0400, you wrote:
>>
>> >
>> >On 11/1/21 9:28 PM, Stephen Worthington wrote:
>> >> On Mon, 1 Nov 2021 15:33:19 -0400, you wrote:
>> >>
>> >>> I know that when I install MythTV on an Ubuntu 20.04 machine it does
>> >>> everything for me in regards to database, Mythweb, passwords and
>> config
>> >>> files. However using apt remove --purge doesn't remove everything.
>> >>>
>> >>> What else do I need to delete to make the mythtv-setup start all over
>> >>> again? I've tried removing the /etc/mythtv directory and the
>> >>> /home/$USER/.mythtv directory. I must be missing something.
>> >>>
>> >>> Maybe the mariadb database is still there???
>> >>>
>> >>> Jim A
>> >> You also need to remove /var/lib/mythtv, as there are changed files
>> >> there (database backups at least).
>> >>
>> >> I would think that there would be user data in the MySQL/MariaDB
>> >> system tables also, even if the mythconverg database is purged. To
>> >> delete that you would need to know what users were created for use
>> >> with mythconverg. So do this:
>> >>
>> >> sudo mysql
>> >> SELECT User, Db, Host from mysql.db where Db='mythconverg';
>> >
>> >I just did this command on my production backend and I assume it would
>> >be the same on my test system.
>> >
>> >mysql> SELECT User, Db, Host from mysql.db where Db='mythconverg';
>> >+--------+-------------+------+
>> >| User | Db | Host |
>> >+--------+-------------+------+
>> >| mythtv | mythconverg | % |
>> >+--------+-------------+------+
>> >1 row in set (0.02 sec)
>> >
>> >Jim A
>>
>> Right, so you would need to do a "DROP USER 'mythtv'@'%';" command.
>> That also deletes all the GRANTs for that user.
>>
>
> So at this point the user is gone, what about mythconverg database itself?
>
> BTW, just testing this on a test system.
>
> sudo apt remove --purge mythtv
> removes /var/lib/mythtv
> leaves /var/log/mythtv/*.log
> leaves /etc/mythtv/*
> leaves /home/jim/.mythtv
> leaves /home/mythtv/.mythtv
> leaves /home/mythtv/.xmltv
>

Even after dropping the user and the database, you can't successfully
install mythtv using the ppa. I got some database errors about can't
connect to the database the first time I run mythtv-setup.

This is why I always reinstall the complete OS when I need a new mythtv
setup. If you had to copy old recordings and restore an old database then
that could take long, but at least you'd be certain you had it right.

Jim A
Re: complete uninstall and reinstall on Ubuntu 20.04 [ In reply to ]
On Tue, 2 Nov 2021 06:45:52 -0400, you wrote:

>On Tue, Nov 2, 2021 at 6:13 AM James Abernathy <jfabernathy@gmail.com>
>wrote:
>
>>
>>
>> On Tue, Nov 2, 2021 at 5:55 AM Stephen Worthington <
>> stephen_agent@jsw.gen.nz> wrote:
>>
>>> On Tue, 2 Nov 2021 05:10:38 -0400, you wrote:
>>>
>>> >
>>> >On 11/1/21 9:28 PM, Stephen Worthington wrote:
>>> >> On Mon, 1 Nov 2021 15:33:19 -0400, you wrote:
>>> >>
>>> >>> I know that when I install MythTV on an Ubuntu 20.04 machine it does
>>> >>> everything for me in regards to database, Mythweb, passwords and
>>> config
>>> >>> files. However using apt remove --purge doesn't remove everything.
>>> >>>
>>> >>> What else do I need to delete to make the mythtv-setup start all over
>>> >>> again? I've tried removing the /etc/mythtv directory and the
>>> >>> /home/$USER/.mythtv directory. I must be missing something.
>>> >>>
>>> >>> Maybe the mariadb database is still there???
>>> >>>
>>> >>> Jim A
>>> >> You also need to remove /var/lib/mythtv, as there are changed files
>>> >> there (database backups at least).
>>> >>
>>> >> I would think that there would be user data in the MySQL/MariaDB
>>> >> system tables also, even if the mythconverg database is purged. To
>>> >> delete that you would need to know what users were created for use
>>> >> with mythconverg. So do this:
>>> >>
>>> >> sudo mysql
>>> >> SELECT User, Db, Host from mysql.db where Db='mythconverg';
>>> >
>>> >I just did this command on my production backend and I assume it would
>>> >be the same on my test system.
>>> >
>>> >mysql> SELECT User, Db, Host from mysql.db where Db='mythconverg';
>>> >+--------+-------------+------+
>>> >| User | Db | Host |
>>> >+--------+-------------+------+
>>> >| mythtv | mythconverg | % |
>>> >+--------+-------------+------+
>>> >1 row in set (0.02 sec)
>>> >
>>> >Jim A
>>>
>>> Right, so you would need to do a "DROP USER 'mythtv'@'%';" command.
>>> That also deletes all the GRANTs for that user.
>>>
>>
>> So at this point the user is gone, what about mythconverg database itself?
>>
>> BTW, just testing this on a test system.
>>
>> sudo apt remove --purge mythtv
>> removes /var/lib/mythtv
>> leaves /var/log/mythtv/*.log
>> leaves /etc/mythtv/*
>> leaves /home/jim/.mythtv
>> leaves /home/mythtv/.mythtv
>> leaves /home/mythtv/.xmltv
>>
>
>Even after dropping the user and the database, you can't successfully
>install mythtv using the ppa. I got some database errors about can't
>connect to the database the first time I run mythtv-setup.
>
>This is why I always reinstall the complete OS when I need a new mythtv
>setup. If you had to copy old recordings and restore an old database then
>that could take long, but at least you'd be certain you had it right.
>
>Jim A

You probably need to delete /etc/config.xml at the same time as you
drop the user - they are created as a pair.

To see if the database is really gone, look at
/var/lib/mysql/mythconverg. That directory and its contents should
not exist any more. If it exists, what does it contain?
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: complete uninstall and reinstall on Ubuntu 20.04 [ In reply to ]
Am Dienstag, 2. November 2021, 00:02:28 CET schrieb James Abernathy:
> I can reinstall in
> 10 minutes and install mythtv in 10 minutes via ppa. Compiling from source
> will take about 15.

So 10 (reinstall) + 10 (ppa) = 20 > 15

--
MfG usw.

Werner Mahr


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: complete uninstall and reinstall on Ubuntu 20.04 [ In reply to ]
On 03/11/2021 01:40, Werner Mahr wrote:
> Am Dienstag, 2. November 2021, 00:02:28 CET schrieb James Abernathy:
>> I can reinstall in
>> 10 minutes and install mythtv in 10 minutes via ppa. Compiling from source
>> will take about 15.
>
> So 10 (reinstall) + 10 (ppa) = 20 > 15
>
True, but that does not clear out all the cruft from the original installation. That was the point
of reinstallation.

--

Mike Perkins

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org