Archive

Posts Tagged ‘delete ports’

Delete all installed packages FreeBsd

September 2, 2011 Leave a comment

FreeBsd has a beautiful utility which is called pkg_delete. As the name implies this command is to remove installed packages/ports . Now lets make a use of it and remove all installed packages.

Why??? If you played with pkg system and port system at the same time to install software sooner or later you’ll need to delete everything and stick with port system (Broken depencies weird acting software etc…)

I know port installation takes forever and its kind of shitty that you can not use pkg system all the time.
(For example if you want to use Php w Apache and install it from pkg collection basically its useless because it doesn’t include libphp5.so which is required by Apache)

I guess this issue will be solved with new freebsd package system which will be included in 9 version (i hope)

Anyways here we go cross your fingers and issue fallowing command:

[root@kuku ~]# pkg_delete -avf

-a all packages
-v verbose output
-f force removal even if there is depency

Note: If you are running any shell other than sh shell which you installed later on. Do not forget to change your shell to default sh before removing everything otherwise single mode is waiting for you……