Solved Uninstall a port that no longer exists in the ports tree

I originally installed net/samba41 however it no longer exists in the ports tree (due to upgrading the ports tree and/or FreeBSD). So I am unable to go to /usr/ports/net/samba41 and make deinstall.

What is the best practice for resolving the issue and/or how can I cleanly uninstall the port?

Also, is there something I need to do in the future so I can avoid this situation?


Thank you in advance.
 
I'm having a similar issue with MySQL51, however pkg-delete(8) is unable to remove it.
Code:
root@host:~ # pkg_info | grep mysql
mysql51-client-5.1.72 Multithreaded SQL database (client)
mysql51-server-5.1.72 Multithreaded SQL database (server)
php5-mysql-5.4.20   The mysql shared extension for php
root@host:~ # pkg delete -f databases/mysql51-server
Checking integrity... done (0 conflicting)
Package(s) not found!
root@host:~ #
Both MySQL packages were installed by building from ports. I no longer need MySQL on the server.

Any other suggestions?
 
First a general comment... If you're having problems finding a package then you can always use pkg info -x partialname to find the full name. The -x parameter can even be used when using pkg-delete(3).

I'm having a similar issue with MySQL51, however 'pkg delete' is unable to remove it.

root@host:~ # pkg_info | grep mysql
mysql51-client-5.1.72 Multithreaded SQL database (client)
mysql51-server-5.1.72 Multithreaded SQL database (server)
php5-mysql-5.4.20 The mysql shared extension for php
root@host:~ # pkg delete -f databases/mysql51-server
Checking integrity... done (0 conflicting)
Package(s) not found!
root@host:~ #
You're using 2 different package managers, making me believe that you might also be using an older (perhaps outdated) version of FreeBSD. pkg_info used to be part of the (now obsolete) Solaris package manager which consisted of commands such as pkg_add, pkg_info, etc.

That has now been replaced by pkgng which basically consists of one command (pkg) which can be used for all needed functions by using several parameters.

However both systems use different databases. And that's what you're seeing up there.

Solution: properly convert the old database to the new format. See the pkg2ng command for that, this thread might also be of some use to you.

(Edit): Forgot to mention, definitely check out the PKGNG FAQ.
 
Back
Top