How to clean system

Giorgos Keramidas keramida at ceid.upatras.gr
Sat Jan 8 21:35:33 UTC 2011


On Sat, 8 Jan 2011 23:18:07 +0200, Коньков Евгений <kes-kes at yandex.ru> wrote:
> Hi
> System have many programs.
> Wanna to upgrade to new version of FBSD
>
> Is it possible to clean system from garbage (all programs, files,
> header files, except configuration files)
> like installing FBSD from CD?
>
> is there cmd?
> make clean-system

No, there's no such command.  If you are looking for a way to 'deinstall
all ports & packages' though, it may be as easy as:

1. Remove all the currently installed ports:

    # rm -fr /usr/local
    # mkdir /usr/local && cd /usr/local
    # mtree -deU < /etc/mtree/BSD.local.dist

2. Remove all the information about 'installed packages', because you
   don't have any of these anymore:

    # rm -fr /var/db/pkg/*

3. Optionally, if you are going to reconfigure all your ports from
   scratch, remove the saved port configuration options:

    # rm -fr /var/db/ports/*



More information about the freebsd-questions mailing list