Re: How to clean system
2011/1/8 Giorgos Keramidas keram...@ceid.upatras.gr: On Sat, 8 Jan 2011 23:18:07 +0200, Коньков Евгений kes-...@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 Deleting /usr/local will also delete /usr/local/etc -- which might be not what the OP expects given the except configuration files. I would still follow the pkg_delete path, along with some other actions: - if you have fusefs, ntfs-3g, linprocfs, etc in your /etc/fstab -- unmount and comment out temporarily - if you have third party services in your /etc/rc.conf[.local] -- stop and comment out - if you have third party modules in /boot/loader.conf -- the same thing % pkg_delete -adf % rm -R /usr/local/lib/compat/pkg % rm -R /var/db/pkg/* # if anything was left there % rm -R /var/db/ports/* #if you want to clean up your ports' configurations % rm -R /usr/ports/distfiles/* # not sure if you need it, but I do it in some cases... % rm -R /usr/obj Check /usr/local and /usr/compat to see if you want to remove anything from there manually. You might want to clean up /usr/local/include, /usr/compat/linux/var, /usr/compat/linux/usr/local, /usr/local/bin (?), /usr/local/info ... etc. OTOH, I always preserve /usr/local/lib/X11/fonts -- I have some custom fonts stored there, /usr/local/share/stardict -- custom dictionaries I want to survive across upgrade ... etc. I also place in /etc/mergemaster.rc something I want to preserve: /etc/master.passwd /etc/group /etc/ppp/ppp.conf /etc/syslog.conf /etc/sysctl.conf /etc/hosts /etc/namedb/named.conf Regarding this last item, it might not always be the best way to do, since sometimes it might be necessary to upgrade some of the default settings in these files. Then you can build and install the base system and the ports you need. Almost all of these steps are easy to automate. Thanks, Markiyan. 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/* ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
How to clean system
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 -- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: How to clean system
On Sat, 8 Jan 2011 23:18:07 +0200, Коньков Евгений kes-...@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/* ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re[2]: How to clean system
GK On Sat, 8 Jan 2011 23:18:07 +0200, Коньков Евгений kes-...@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 GK No, there's no such command. If you are looking for a way to 'deinstall GK all ports packages' though, it may be as easy as: GK 1. Remove all the currently installed ports: GK # rm -fr /usr/local GK # mkdir /usr/local cd /usr/local GK # mtree -deU /etc/mtree/BSD.local.dist GK 2. Remove all the information about 'installed packages', because you GKdon't have any of these anymore: GK # rm -fr /var/db/pkg/* GK 3. Optionally, if you are going to reconfigure all your ports from GKscratch, remove the saved port configuration options: GK # rm -fr /var/db/ports/* I have tried: pkg_delete -a but many files are left in /usr/bin /usr/sbin ... ((( also there are files from old 7.2 system, now I have 9.0 -- С уважением, Коньков mailto:kes-...@yandex.ru ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Re[2]: How to clean system
On Sat, 8 Jan 2011 23:41:24 +0200, Коньков Евгений kes-...@yandex.ru wrote: I have tried: pkg_delete -a but many files are left in /usr/bin /usr/sbin ... ((( Keep in mind that FreeBSD is not Linux. There is the base system (/usr/bin, /usr/sbin, ...), and there are the applications installed by ports or packages (/usr/local subtree). See /usr/src/Makefile's comment section about how to clean out obsolete parts of the base system. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: How to clean system
On Sat, 8 Jan 2011 23:41:24 +0200, Коньков Евгений kes-...@yandex.ru wrote: GK On Sat, 8 Jan 2011 23:18:07 +0200, Коньков Евгений kes-...@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 GK No, there's no such command. If you are looking for a way to 'deinstall GK all ports packages' though, it may be as easy as: GK 1. Remove all the currently installed ports: GK # rm -fr /usr/local GK # mkdir /usr/local cd /usr/local GK # mtree -deU /etc/mtree/BSD.local.dist GK 2. Remove all the information about 'installed packages', because you GKdon't have any of these anymore: GK # rm -fr /var/db/pkg/* GK 3. Optionally, if you are going to reconfigure all your ports from GKscratch, remove the saved port configuration options: GK # rm -fr /var/db/ports/* I have tried: pkg_delete -a but many files are left in /usr/bin /usr/sbin ... ((( also there are files from old 7.2 system, now I have 9.0 Packages should never install stuff in /usr/bin and /usr/sbin. Ports should *only* install files in /usr/local/... There are a few ports that includes options to override base-system files in /usr but these are the exception. If you have been upgrading from source from 7.2 then you should also have a look at the `/usr/src/UPDATING' file; especially at the help about the 'make delete-old' targets of the source makefiles. Most of the cruft left behind from old, obsolete stuff can be deleted by running # cd /usr/src # make delete-old and following the prompts. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: How to clean system
keram...@freebsd.org (Giorgos Keramidas) wrote: Packages should never install stuff in /usr/bin and /usr/sbin. Ports should *only* install files in /usr/local/... There are a few ports that includes options to override base-system files in /usr but these are the exception. The doc ports install into /usr (granted, not /usr/bin nor /usr/sbin AFAIK) by default. I would not be at all surprised if a few others did also. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org