Date: Sun, 14 Jun 2009 18:08:42 +0300 From: Manolis Kiagias <sonicy@otenet.gr> To: Pieter de Goeje <pieter@degoeje.nl> Cc: freebsd-questions@freebsd.org Subject: Re: what is the best way to remove a program? Message-ID: <4A35127A.2090708@otenet.gr> In-Reply-To: <200906141605.45421.pieter@degoeje.nl> References: <4096aedd0906140558x5ad1b562h2c43a0b36051a40e@mail.gmail.com> <200906141605.45421.pieter@degoeje.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
Pieter de Goeje wrote:
> On Sunday 14 June 2009 14:58:46 Mark Hartkemeyer wrote:
>
>> I was installing the mysql51-server port and I had a message that the
>> install could not proceed, because mysql50-client was already
>> installed. I simply ran a "cd" and then a "make deinstall" in the
>> mysql50-client directory. Is this is the best way to remove a
>> program? Does it depend on how the program was added (compiled versus
>> prebuilt binary added with pkg_add -r)? I've tried pkg_delete in the
>> past, but it seems to always complain about dependencies and not
>> actually remove the program.
>>
>> Thanks,
>> Mark Hartkemeyer
>>
>
> "make deinstall" is a good way to remove a program, but it ignores
> dependencies as you discovered. Some other program on your system requires
> mysql50-client to function and might now be broken.
> pkg_delete -f does basically the same. pkg_deinstall (which comes with
> portupgrade) also does the trick.
>
> Before doing a "make deinstall" you can check which installed packages require
> it by:
> pkg_info -Rx mysql-client
>
> If you want to upgrade mysql-client from 5.0 to 5.1, use portupgrade:
> portupgrade -rf -o databases/mysql51-client mysql-client
>
> This will replace mysql50-client with mysql51-client and reinstall all ports
> depending on mysql50-client ("-rf"), so they will use the new version. In this
> case the last step probably isn't necessary because the libraries are (mostly
> I think) compatible, but in general it is recommended.
>
> For more information, see "man ports" and "man portupgrade".
>
>
For an easy interactive program that takes care of dependencies, I would
suggest ports-mgmt/pkg_rmleaves
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A35127A.2090708>
