Clean up installed software

Hi,

I want to clean up my FreeBSD installation.

What strategie is best to remove unneeded software?

Code:
portmaster -L
===>>> Root ports (No dependencies, not depended on)
===>>> bigreqsproto-1.1.1
===>>> bonnie++-1.96_1
===>>> bsdadminscripts-6.1.1_1
===>>> cpdup-1.17_1
===>>> cvsup-without-gui-16.1h_4
===>>> ezm3-1.1_2
===>>> inputproto-2.0.2
===>>> iperf-2.0.5
===>>> libcheck-0.9.8
===>>> libtool-2.4_1
===>>> portaudit-0.5.17
===>>> portmanager-0.4.1_9
===>>> portmaster-3.11
===>>> smartmontools-5.42_2
===>>> tidy4-20000804_3
===>>> unzip-6.0_1
===>>> xcmiscproto-1.2.1
===>>> xf86bigfontproto-1.2.0
===>>> xorg-macros-1.15.0
===>>> zfsnap-1.10.1
===>>> 20 root ports

===>>> Trunk ports (No dependencies, are depended on)
===>>> adobe-cmaps-20051217_1
===>>> autoconf-wrapper-20101119
===>>> automake-wrapper-20101119
===>>> db46-4.6.21.4
===>>> expat-2.0.1_2
===>>> font-amsfonts-3.02_1
===>>> freetype-1.3.1_4
===>>> gdbm-1.9.1
===>>> gmp-5.0.2
===>>> gsfonts-8.11_5
===>>> html2text-1.3.2a
===>>> jbigkit-1.6
===>>> jpeg-8_3
===>>> kbproto-1.0.5
===>>> libexecinfo-1.1_3
===>>> libiconv-1.13.1_1
===>>> libltdl-2.4_1
===>>> libpaper-1.1.24
===>>> libsunacl-1.0
===>>> libwww-5.4.0_4
===>>> links-0.98,1
===>>> m4-1.4.16,1
===>>> openldap-client-2.4.26
===>>> p11-kit-0.10
===>>> perl-5.12.4_3
===>>> pkg-config-0.25_1
===>>> png-1.4.8
===>>> printproto-1.0.5
===>>> python26-2.6.7_2
===>>> renderproto-0.11.1
===>>> ruby-1.8.7.352_2,1
===>>> scr2txt-1.2
===>>> t1utils-1.32
===>>> tcl-modules-8.5.11
===>>> tex-texmflocal-1.9
===>>> tidy-lib-090315.c_1
===>>> xbitmaps-1.1.1
===>>> xextproto-7.2.0
===>>> xmlcatmgr-2.2
===>>> 39 trunk ports

===>>> Branch ports (Have dependencies, are depended on)
===>>> OpenSP-1.5.2_2
===>>> apr-ipv6-devrandom-gdbm-db46-1.4.5.1.3.12_1
===>>> autoconf-2.68
===>>> cm-super-0.3.4_3
===>>> cups-client-1.5.0
===>>> cups-image-1.5.0
===>>> docbook-1.4
===>>> docbook-4.1_4
===>>> docbook-4.2
===>>> docbook-4.3
===>>> docbook-4.4_2
===>>> docbook-4.5_2
===>>> docbook-5.0_1
===>>> docbook-sk-4.1.2_4
===>>> docbook-xml-4.2_1
===>>> docbook-xml-4.3
===>>> docbook-xml-4.4_1
===>>> docbook-xml-4.5
===>>> docbook-xsl-1.76.1
===>>> dsssl-docbook-modular-1.79_1,1
===>>> dvipdfmx-20100328
===>>> dvipsk-tetex-5.95a_5
===>>> fixrtf-0.1.20060303_1
===>>> fontconfig-2.8.0_1,1
===>>> freetype-tools-1.3.1_8
===>>> freetype2-2.4.7
===>>> gd-2.0.35_7,1
===>>> gettext-0.18.1.1
===>>> ghostscript9-nox11-9.02_4
	===>>> New version available: ghostscript9-nox11-9.04
===>>> gmake-3.82
===>>> gnutls-2.12.16
===>>> html-4.01_2
===>>> iso8879-1986_2
===>>> ja-p5-Jcode-2.07
===>>> jadetex-3.13_7
===>>> jasper-1.900.1_10
===>>> jbig2dec-0.11
===>>> latex-cjk-4.8.2_5
===>>> libICE-1.0.7,1
===>>> libSM-1.2.0,1
===>>> libX11-1.4.4,1
===>>> libXau-1.0.6
===>>> libXaw-1.0.8,1
===>>> libXdmcp-1.1.0
===>>> libXext-1.3.0_1,1
===>>> libXft-2.1.14
===>>> libXmu-1.1.0,1
===>>> libXp-1.0.1,1
===>>> libXpm-3.5.9
===>>> libXrender-0.9.6
===>>> libXt-1.0.9
===>>> libfontenc-1.1.0
===>>> libgcrypt-1.5.0
===>>> libgpg-error-1.10
===>>> libpthread-stubs-0.3_3
===>>> libxcb-1.7
===>>> libxml2-2.7.8_1
===>>> libxslt-1.1.26_3
===>>> linuxdoc-1.1_1
===>>> mkfontdir-1.0.6
===>>> mkfontscale-1.0.9
===>>> netpbm-10.35.83
===>>> nettle-2.4
===>>> open-motif-2.3.3
===>>> openjade-1.3.3p1_2
===>>> p5-Authen-SASL-2.15
===>>> p5-Convert-ASN1-0.22
===>>> p5-Crypt-SmbHash-0.12
===>>> p5-Digest-HMAC-1.03
===>>> p5-Digest-SHA1-2.13
===>>> p5-GSSAPI-0.28
===>>> p5-IO-Socket-SSL-1.53
===>>> p5-Locale-gettext-1.05_3
===>>> p5-Net-SSLeay-1.42
===>>> p5-URI-1.59
===>>> p5-Unicode-Map-0.112
===>>> p5-Unicode-Map8-0.13
===>>> p5-Unicode-MapUTF8-1.11
===>>> p5-Unicode-String-2.09
===>>> p5-XML-Filter-BufferText-1.01
===>>> p5-XML-NamespaceSupport-1.11
===>>> p5-XML-Parser-2.41
===>>> p5-XML-SAX-0.96
===>>> p5-XML-SAX-Writer-0.53
===>>> p5-perl-ldap-0.4300
===>>> peps-2.0_4
===>>> popt-1.16
===>>> ruby18-bdb-0.6.6
===>>> scr2png-1.2_4
===>>> sqlite3-3.7.9_1
===>>> t1lib-5.1.2_1,1
===>>> talloc-2.0.7
===>>> tdb-1.2.9,1
===>>> teTeX-3.0_5
===>>> teTeX-base-3.0_22
===>>> teTeX-texmf-3.0_8
===>>> texi2html-1.82,1
===>>> tiff-4.0.0_3
===>>> ttf2pt1-3.4.4_2
===>>> xdvik-tetex-22.84.16_3
===>>> xhtml-1.0.20020801_4
===>>> xmlcharent-0.3_2
===>>> xproto-7.0.22
===>>> zh-arphicttf-2.11_2
===>>> zh-docproj-0.1.20060303_5
===>>> zh-ttfm-0.9.5_3
===>>> 106 branch ports

===>>> Leaf ports (Have dependencies, not depended on)
===>>> automake-1.11.1
===>>> bash-4.2.20
===>>> bison-2.4.3,1
===>>> cups-base-1.5.0
===>>> docproj-jadetex-1.17_4
===>>> fastest_cvsup-0.3.0
===>>> help2man-1.40.5
===>>> nano-2.2.6
===>>> nss_ldap-1.265_7
===>>> openldap-server-2.4.26
===>>> p5-type1inst-0.6.1_5
===>>> portupgrade-2.4.9.3,2
===>>> samba35-3.5.11
===>>> smbldap-tools-0.9.7
===>>> subversion-1.7.2
===>>> sudo-1.8.3_1
===>>> tcl-8.5.11
===>>> xcb-proto-1.6
===>>> xtrans-1.2.6
===>>> zh-ttf2pt1-3.4.0
===>>> 20 leaf ports

===>>> 185 total installed ports
	===>>> 1 has a new version available

Can I remove root ports I don't need and then use portmaster to remove packages which aren't required?

Regards
 
Hi,

I chosen pkg_cutleaves and works quite fine :)

I mentioned that there where lots of X11-packages even I don't use GUI on my server. Do the packages usually install them?
 
Yes, a good example is editors/vim. To get rid of the X11 dependencies you'd have to compile your own package with WITHOUT_X11 set to "YES" in /etc/make.conf.

Code:
pkg_info -rx vim 
Information for vim-7.3.121:

Depends on:
Dependency: xineramaproto-1.2.1
Dependency: xextproto-7.2.0
Dependency: renderproto-0.11.1
Dependency: randrproto-1.3.2
Dependency: kbproto-1.0.5
Dependency: inputproto-2.0.2
Dependency: fixesproto-5.0
Dependency: damageproto-1.2.1
Dependency: compositeproto-0.4.2
Dependency: font-util-1.2.0
Dependency: encodings-1.0.4,1
Dependency: expat-2.0.1_2
Dependency: cups-client-1.5.0
Dependency: hicolor-icon-theme-0.12
Dependency: python27-2.7.2_3
Dependency: perl-5.12.4_3
Dependency: png-1.4.8
Dependency: jpeg-8_3
Dependency: jbigkit-1.6
Dependency: tiff-4.0.0_3
Dependency: jasper-1.900.1_10
Dependency: pkg-config-0.25_1
Dependency: pixman-0.24.0
...
 
ezm3 and cvsup-without-gui aren't needed. csup(1) in the base replaces cvsup. There are also benchmarking apps (bonnie++, iperf) which aren't needed unless you regularly run benchmarks.

If you installed packages instead of ports, that explains the X dependencies. Packages are for people in a hurry; you don't get to turn off unnecessary stff. Ports are for when you want it built in a certain way. To avoid X as much as possible when building ports:
/etc/make.conf
Code:
WITHOUT_X11=yes
There are a few things that still have dependencies on X libs, but they will install only those libraries instead of the full xorg.
 
Hi,

thank you for the hint with the make.conf. After cleaning up I only have following packages (quite a lot removed :)):
Code:
server ~ # portmaster -L
===>>> Root ports (No dependencies, not depended on)
===>>> bsdadminscripts-6.1.1_1
===>>> db46-4.6.21.4
===>>> portaudit-0.5.17
===>>> portmaster-3.11
===>>> smartmontools-5.42_2
===>>> unzip-6.0_1
===>>> zfsnap-1.10.1
===>>> 7 root ports

===>>> Trunk ports (No dependencies, are depended on)
===>>> autoconf-wrapper-20101119
===>>> automake-wrapper-20101119
===>>> gmp-5.0.2
===>>> libexecinfo-1.1_3
===>>> libiconv-1.13.1_1
===>>> libsunacl-1.0
===>>> m4-1.4.16,1
===>>> openldap-client-2.4.26
===>>> p11-kit-0.10
===>>> perl-5.12.4_3
===>>> pkg-config-0.25_1
===>>> python26-2.6.7_2
===>>> tcl-modules-8.5.11
===>>> 13 trunk ports

===>>> Branch ports (Have dependencies, are depended on)
===>>> autoconf-2.68
===>>> cups-client-1.5.0
===>>> gettext-0.18.1.1
===>>> gmake-3.82
===>>> gnutls-2.12.16
===>>> ja-p5-Jcode-2.07
===>>> libgcrypt-1.5.0
===>>> libgpg-error-1.10
===>>> nettle-2.4
===>>> p5-Authen-SASL-2.15
===>>> p5-Convert-ASN1-0.22
===>>> p5-Crypt-SmbHash-0.12
===>>> p5-Digest-HMAC-1.03
===>>> p5-Digest-SHA1-2.13
===>>> p5-GSSAPI-0.28
===>>> p5-IO-Socket-SSL-1.53
===>>> p5-Net-SSLeay-1.42
===>>> p5-URI-1.59
===>>> p5-Unicode-Map-0.112
===>>> p5-Unicode-Map8-0.13
===>>> p5-Unicode-MapUTF8-1.11
===>>> p5-Unicode-String-2.09
===>>> p5-XML-Filter-BufferText-1.01
===>>> p5-XML-NamespaceSupport-1.11
===>>> p5-XML-SAX-0.96
===>>> p5-XML-SAX-Writer-0.53
===>>> p5-perl-ldap-0.4300
===>>> popt-1.16
===>>> talloc-2.0.7
===>>> tdb-1.2.9,1
===>>> 30 branch ports

===>>> Leaf ports (Have dependencies, not depended on)
===>>> automake-1.11.1
===>>> bash-4.2.20
===>>> bison-2.4.3,1
===>>> pkg_cutleaves-20090810
===>>> samba35-3.5.11
===>>> smbldap-tools-0.9.7
===>>> sudo-1.8.3_1
===>>> tcl-8.5.11
===>>> 8 leaf ports

===>>> 58 total installed ports
	===>>> There are no new versions available
server ~ #
 
portmaster -s will clean out stale ports that used to be depended on. So, you could use pkg_delete -f and remove unwanted ports and then portmaster -s to clean up.
 
Back
Top