From owner-freebsd-questions@FreeBSD.ORG Sun Jun 14 14:06:17 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C49DE10656A9 for ; Sun, 14 Jun 2009 14:06:17 +0000 (UTC) (envelope-from pieter@degoeje.nl) Received: from smtp.utwente.nl (smtp1.utsp.utwente.nl [130.89.2.8]) by mx1.freebsd.org (Postfix) with ESMTP id 47FCF8FC1A for ; Sun, 14 Jun 2009 14:06:16 +0000 (UTC) (envelope-from pieter@degoeje.nl) Received: from nox.student.utwente.nl (nox.student.utwente.nl [130.89.165.91]) by smtp.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id n5EE5jdL015903 for ; Sun, 14 Jun 2009 16:05:45 +0200 From: Pieter de Goeje To: freebsd-questions@freebsd.org Date: Sun, 14 Jun 2009 16:05:45 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-CURRENT; KDE/4.2.4; amd64; ; ) References: <4096aedd0906140558x5ad1b562h2c43a0b36051a40e@mail.gmail.com> In-Reply-To: <4096aedd0906140558x5ad1b562h2c43a0b36051a40e@mail.gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906141605.45421.pieter@degoeje.nl> X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact servicedesk@icts.utwente.nl for more information. X-UTwente-MailScanner: Found to be clean X-UTwente-MailScanner-From: pieter@degoeje.nl X-Spam-Status: No Subject: Re: what is the best way to remove a program? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2009 14:06:18 -0000 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". -- Pieter de Goeje