3

I'm quite new to Linux, but before using it I was hearing that Windows programs, after uninstallation, leaves a lot of remains on the hard disc, and Linux removes all.

I'm using Ubuntu 10.04. To uninstall packages I'm using sudo apt-get autoremove application_name or sudo aptitude purge application_name. Recently I have installed texlive-full and for some reasons I had quickly to uninstall it. After I've entered to terminal updatedb, then locate *texlive* and the output was very long:

maria@marysia-ubuntu:~$ locate *texlive*
/etc/texmf/fmt.d/10texlive-base.cnf
/etc/texmf/fmt.d/10texlive-formats-extra.cnf
/etc/texmf/fmt.d/10texlive-lang-cyrillic.cnf
/etc/texmf/fmt.d/10texlive-lang-czechslovak.cnf
/etc/texmf/fmt.d/10texlive-lang-polish.cnf
/etc/texmf/fmt.d/10texlive-latex-base.cnf
/etc/texmf/fmt.d/10texlive-math-extra.cnf
/etc/texmf/fmt.d/10texlive-metapost.cnf
/etc/texmf/fmt.d/10texlive-omega.cnf
/etc/texmf/fmt.d/10texlive-xetex.cnf
/etc/texmf/hyphen.d/09texlive-base.cnf
/etc/texmf/hyphen.d/10texlive-lang-arabic.cnf
/etc/texmf/hyphen.d/10texlive-lang-croatian.cnf
/etc/texmf/hyphen.d/10texlive-lang-cyrillic.cnf
/etc/texmf/hyphen.d/10texlive-lang-czechslovak.cnf
/etc/texmf/hyphen.d/10texlive-lang-danish.cnf
/etc/texmf/hyphen.d/10texlive-lang-dutch.cnf
/etc/texmf/hyphen.d/10texlive-lang-finnish.cnf
/etc/texmf/hyphen.d/10texlive-lang-french.cnf
/etc/texmf/hyphen.d/10texlive-lang-german.cnf
/etc/texmf/hyphen.d/10texlive-lang-greek.cnf
/etc/texmf/hyphen.d/10texlive-lang-hungarian.cnf
/etc/texmf/hyphen.d/10texlive-lang-indic.cnf
/etc/texmf/hyphen.d/10texlive-lang-italian.cnf
/etc/texmf/hyphen.d/10texlive-lang-latin.cnf
/etc/texmf/hyphen.d/10texlive-lang-latvian.cnf
/etc/texmf/hyphen.d/10texlive-lang-lithuanian.cnf
/etc/texmf/hyphen.d/10texlive-lang-mongolian.cnf
/etc/texmf/hyphen.d/10texlive-lang-norwegian.cnf
/etc/texmf/hyphen.d/10texlive-lang-other.cnf
/etc/texmf/hyphen.d/10texlive-lang-polish.cnf
/etc/texmf/hyphen.d/10texlive-lang-portuguese.cnf
/etc/texmf/hyphen.d/10texlive-lang-spanish.cnf
/etc/texmf/hyphen.d/10texlive-lang-swedish.cnf
/etc/texmf/hyphen.d/10texlive-lang-ukenglish.cnf
/etc/texmf/updmap.d/10texlive-base.cfg
/etc/texmf/updmap.d/10texlive-fonts-extra.cfg
/etc/texmf/updmap.d/10texlive-fonts-recommended.cfg
/etc/texmf/updmap.d/10texlive-games.cfg
/etc/texmf/updmap.d/10texlive-lang-african.cfg
/etc/texmf/updmap.d/10texlive-lang-arabic.cfg
/etc/texmf/updmap.d/10texlive-lang-cyrillic.cfg
/etc/texmf/updmap.d/10texlive-lang-czechslovak.cfg
/etc/texmf/updmap.d/10texlive-lang-french.cfg
/etc/texmf/updmap.d/10texlive-lang-greek.cfg
/etc/texmf/updmap.d/10texlive-lang-hebrew.cfg
/etc/texmf/updmap.d/10texlive-lang-indic.cfg
/etc/texmf/updmap.d/10texlive-lang-lithuanian.cfg
/etc/texmf/updmap.d/10texlive-lang-mongolian.cfg
/etc/texmf/updmap.d/10texlive-lang-polish.cfg
/etc/texmf/updmap.d/10texlive-lang-vietnamese.cfg
/etc/texmf/updmap.d/10texlive-latex-base.cfg
/etc/texmf/updmap.d/10texlive-latex-extra.cfg
/etc/texmf/updmap.d/10texlive-math-extra.cfg
/etc/texmf/updmap.d/10texlive-omega.cfg
/etc/texmf/updmap.d/10texlive-pictures.cfg
/etc/texmf/updmap.d/10texlive-science.cfg
/var/cache/apt/archives/texlive-base_2009-7_all.deb
/var/cache/apt/archives/texlive-bibtex-extra_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-binaries_2009-5ubuntu0.2_i386.deb
/var/cache/apt/archives/texlive-common_2009-7_all.deb
/var/cache/apt/archives/texlive-doc-base_2009-2_all.deb
/var/cache/apt/archives/texlive-doc-bg_2009-2_all.deb
/var/cache/apt/archives/texlive-doc-cs+sk_2009-2_all.deb
/var/cache/apt/archives/texlive-doc-de_2009-2_all.deb
/var/cache/apt/archives/texlive-doc-en_2009-2_all.deb
/var/cache/apt/archives/texlive-doc-es_2009-2_all.deb
/var/cache/apt/archives/texlive-doc-fi_2009-2_all.deb
/var/cache/apt/archives/texlive-doc-fr_2009-2_all.deb
/var/cache/apt/archives/texlive-doc-it_2009-2_all.deb
/var/cache/apt/archives/texlive-doc-ja_2009-2_all.deb
/var/cache/apt/archives/texlive-doc-ko_2009-2_all.deb
/var/cache/apt/archives/texlive-doc-mn_2009-2_all.deb
/var/cache/apt/archives/texlive-doc-nl_2009-2_all.deb
/var/cache/apt/archives/texlive-doc-pl_2009-2_all.deb
/var/cache/apt/archives/texlive-doc-pt_2009-2_all.deb
/var/cache/apt/archives/texlive-doc-ru_2009-2_all.deb
/var/cache/apt/archives/texlive-doc-si_2009-2_all.deb
/var/cache/apt/archives/texlive-doc-th_2009-2_all.deb
/var/cache/apt/archives/texlive-doc-tr_2009-2_all.deb
/var/cache/apt/archives/texlive-doc-uk_2009-2_all.deb
/var/cache/apt/archives/texlive-doc-vi_2009-2_all.deb
/var/cache/apt/archives/texlive-doc-zh_2009-2_all.deb
/var/cache/apt/archives/texlive-extra-utils_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-font-utils_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-fonts-extra-doc_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-fonts-extra_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-fonts-recommended-doc_2009-7_all.deb
/var/cache/apt/archives/texlive-fonts-recommended_2009-7_all.deb
/var/cache/apt/archives/texlive-formats-extra_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-full_2009-7_all.deb
/var/cache/apt/archives/texlive-games_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-generic-extra_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-generic-recommended_2009-7_all.deb
/var/cache/apt/archives/texlive-humanities-doc_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-humanities_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-lang-african_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-arabic_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-armenian_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-croatian_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-cyrillic_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-czechslovak_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-danish_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-dutch_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-finnish_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-french_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-german_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-greek_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-hebrew_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-hungarian_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-indic_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-italian_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-latin_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-latvian_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-lithuanian_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-mongolian_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-norwegian_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-other_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-polish_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-portuguese_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-spanish_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-swedish_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-tibetan_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-ukenglish_2009-3_all.deb
/var/cache/apt/archives/texlive-lang-vietnamese_2009-3_all.deb
/var/cache/apt/archives/texlive-latex-base-doc_2009-7_all.deb
/var/cache/apt/archives/texlive-latex-base_2009-7_all.deb
/var/cache/apt/archives/texlive-latex-extra-doc_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-latex-extra_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-latex-recommended-doc_2009-7_all.deb
/var/cache/apt/archives/texlive-latex-recommended_2009-7_all.deb
/var/cache/apt/archives/texlive-latex3_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-luatex_2009-7_all.deb
/var/cache/apt/archives/texlive-math-extra_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-metapost-doc_2009-7_all.deb
/var/cache/apt/archives/texlive-metapost_2009-7_all.deb
/var/cache/apt/archives/texlive-music_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-omega_2009-7_all.deb
/var/cache/apt/archives/texlive-pictures-doc_2009-7_all.deb
/var/cache/apt/archives/texlive-pictures_2009-7_all.deb
/var/cache/apt/archives/texlive-plain-extra_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-pstricks-doc_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-pstricks_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-publishers-doc_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-publishers_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-science-doc_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-science_2009-7ubuntu3_all.deb
/var/cache/apt/archives/texlive-xetex_2009-7_all.deb
/var/cache/apt/archives/texlive_2009-7_all.deb
/var/lib/dpkg/info/texlive-base.list
/var/lib/dpkg/info/texlive-base.postrm
/var/lib/dpkg/info/texlive-bibtex-extra.list
/var/lib/dpkg/info/texlive-bibtex-extra.postrm
/var/lib/dpkg/info/texlive-doc-base.list
/var/lib/dpkg/info/texlive-doc-base.postrm
/var/lib/dpkg/info/texlive-doc-bg.list
/var/lib/dpkg/info/texlive-doc-bg.postrm
/var/lib/dpkg/info/texlive-doc-cs+sk.list
/var/lib/dpkg/info/texlive-doc-cs+sk.postrm
/var/lib/dpkg/info/texlive-doc-de.list
/var/lib/dpkg/info/texlive-doc-de.postrm
/var/lib/dpkg/info/texlive-doc-en.list
/var/lib/dpkg/info/texlive-doc-en.postrm
/var/lib/dpkg/info/texlive-doc-es.list
/var/lib/dpkg/info/texlive-doc-es.postrm
/var/lib/dpkg/info/texlive-doc-fi.list
/var/lib/dpkg/info/texlive-doc-fi.postrm
/var/lib/dpkg/info/texlive-doc-fr.list
/var/lib/dpkg/info/texlive-doc-fr.postrm
/var/lib/dpkg/info/texlive-doc-it.list
/var/lib/dpkg/info/texlive-doc-it.postrm
/var/lib/dpkg/info/texlive-doc-ja.list
/var/lib/dpkg/info/texlive-doc-ja.postrm
/var/lib/dpkg/info/texlive-doc-ko.list
/var/lib/dpkg/info/texlive-doc-ko.postrm
/var/lib/dpkg/info/texlive-doc-mn.list
/var/lib/dpkg/info/texlive-doc-mn.postrm
/var/lib/dpkg/info/texlive-doc-nl.list
/var/lib/dpkg/info/texlive-doc-nl.postrm
/var/lib/dpkg/info/texlive-doc-pl.list
/var/lib/dpkg/info/texlive-doc-pl.postrm
/var/lib/dpkg/info/texlive-doc-pt.list
/var/lib/dpkg/info/texlive-doc-pt.postrm
/var/lib/dpkg/info/texlive-doc-ru.list
/var/lib/dpkg/info/texlive-doc-ru.postrm
/var/lib/dpkg/info/texlive-doc-si.list
/var/lib/dpkg/info/texlive-doc-si.postrm
/var/lib/dpkg/info/texlive-doc-th.list
/var/lib/dpkg/info/texlive-doc-th.postrm
/var/lib/dpkg/info/texlive-doc-tr.list
/var/lib/dpkg/info/texlive-doc-tr.postrm
/var/lib/dpkg/info/texlive-doc-uk.list
/var/lib/dpkg/info/texlive-doc-uk.postrm
/var/lib/dpkg/info/texlive-doc-vi.list
/var/lib/dpkg/info/texlive-doc-vi.postrm
/var/lib/dpkg/info/texlive-doc-zh.list
/var/lib/dpkg/info/texlive-doc-zh.postrm
/var/lib/dpkg/info/texlive-extra-utils.list
/var/lib/dpkg/info/texlive-extra-utils.postrm
/var/lib/dpkg/info/texlive-font-utils.list
/var/lib/dpkg/info/texlive-font-utils.postrm
/var/lib/dpkg/info/texlive-fonts-extra-doc.list
/var/lib/dpkg/info/texlive-fonts-extra-doc.postrm
/var/lib/dpkg/info/texlive-fonts-extra.list
/var/lib/dpkg/info/texlive-fonts-extra.postrm
/var/lib/dpkg/info/texlive-fonts-recommended-doc.list
/var/lib/dpkg/info/texlive-fonts-recommended-doc.postrm
/var/lib/dpkg/info/texlive-fonts-recommended.list
/var/lib/dpkg/info/texlive-fonts-recommended.postrm
/var/lib/dpkg/info/texlive-formats-extra.list
/var/lib/dpkg/info/texlive-formats-extra.postrm
/var/lib/dpkg/info/texlive-games.list
/var/lib/dpkg/info/texlive-games.postrm
/var/lib/dpkg/info/texlive-generic-extra.list
/var/lib/dpkg/info/texlive-generic-extra.postrm
/var/lib/dpkg/info/texlive-generic-recommended.list
/var/lib/dpkg/info/texlive-generic-recommended.postrm
/var/lib/dpkg/info/texlive-humanities-doc.list
/var/lib/dpkg/info/texlive-humanities-doc.postrm
/var/lib/dpkg/info/texlive-humanities.list
/var/lib/dpkg/info/texlive-humanities.postrm
/var/lib/dpkg/info/texlive-lang-african.list
/var/lib/dpkg/info/texlive-lang-african.postrm
/var/lib/dpkg/info/texlive-lang-arabic.list
/var/lib/dpkg/info/texlive-lang-arabic.postrm
/var/lib/dpkg/info/texlive-lang-armenian.list
/var/lib/dpkg/info/texlive-lang-armenian.postrm
/var/lib/dpkg/info/texlive-lang-croatian.list
/var/lib/dpkg/info/texlive-lang-croatian.postrm
/var/lib/dpkg/info/texlive-lang-cyrillic.list
/var/lib/dpkg/info/texlive-lang-cyrillic.postrm
/var/lib/dpkg/info/texlive-lang-czechslovak.list
/var/lib/dpkg/info/texlive-lang-czechslovak.postrm
/var/lib/dpkg/info/texlive-lang-danish.list
/var/lib/dpkg/info/texlive-lang-danish.postrm
/var/lib/dpkg/info/texlive-lang-dutch.list
/var/lib/dpkg/info/texlive-lang-dutch.postrm
/var/lib/dpkg/info/texlive-lang-finnish.list
/var/lib/dpkg/info/texlive-lang-finnish.postrm
/var/lib/dpkg/info/texlive-lang-french.list
/var/lib/dpkg/info/texlive-lang-french.postrm
/var/lib/dpkg/info/texlive-lang-german.list
/var/lib/dpkg/info/texlive-lang-german.postrm
/var/lib/dpkg/info/texlive-lang-greek.list
/var/lib/dpkg/info/texlive-lang-greek.postrm
/var/lib/dpkg/info/texlive-lang-hebrew.list
/var/lib/dpkg/info/texlive-lang-hebrew.postrm
/var/lib/dpkg/info/texlive-lang-hungarian.list
/var/lib/dpkg/info/texlive-lang-hungarian.postrm
/var/lib/dpkg/info/texlive-lang-indic.list
/var/lib/dpkg/info/texlive-lang-indic.postrm
/var/lib/dpkg/info/texlive-lang-italian.list
/var/lib/dpkg/info/texlive-lang-italian.postrm
/var/lib/dpkg/info/texlive-lang-latin.list
/var/lib/dpkg/info/texlive-lang-latin.postrm
/var/lib/dpkg/info/texlive-lang-latvian.list
/var/lib/dpkg/info/texlive-lang-latvian.postrm
/var/lib/dpkg/info/texlive-lang-lithuanian.list
/var/lib/dpkg/info/texlive-lang-lithuanian.postrm
/var/lib/dpkg/info/texlive-lang-mongolian.list
/var/lib/dpkg/info/texlive-lang-mongolian.postrm
/var/lib/dpkg/info/texlive-lang-norwegian.list
/var/lib/dpkg/info/texlive-lang-norwegian.postrm
/var/lib/dpkg/info/texlive-lang-other.list
/var/lib/dpkg/info/texlive-lang-other.postrm
/var/lib/dpkg/info/texlive-lang-polish.list
/var/lib/dpkg/info/texlive-lang-polish.postrm
/var/lib/dpkg/info/texlive-lang-portuguese.list
/var/lib/dpkg/info/texlive-lang-portuguese.postrm
/var/lib/dpkg/info/texlive-lang-spanish.list
/var/lib/dpkg/info/texlive-lang-spanish.postrm
/var/lib/dpkg/info/texlive-lang-swedish.list
/var/lib/dpkg/info/texlive-lang-swedish.postrm
/var/lib/dpkg/info/texlive-lang-tibetan.list
/var/lib/dpkg/info/texlive-lang-tibetan.postrm
/var/lib/dpkg/info/texlive-lang-ukenglish.list
/var/lib/dpkg/info/texlive-lang-ukenglish.postrm
/var/lib/dpkg/info/texlive-lang-vietnamese.list
/var/lib/dpkg/info/texlive-lang-vietnamese.postrm
/var/lib/dpkg/info/texlive-latex-base-doc.list
/var/lib/dpkg/info/texlive-latex-base-doc.postrm
/var/lib/dpkg/info/texlive-latex-base.list
/var/lib/dpkg/info/texlive-latex-base.postrm
/var/lib/dpkg/info/texlive-latex-extra-doc.list
/var/lib/dpkg/info/texlive-latex-extra-doc.postrm
/var/lib/dpkg/info/texlive-latex-extra.list
/var/lib/dpkg/info/texlive-latex-extra.postrm
/var/lib/dpkg/info/texlive-latex-recommended-doc.list
/var/lib/dpkg/info/texlive-latex-recommended-doc.postrm
/var/lib/dpkg/info/texlive-latex-recommended.list
/var/lib/dpkg/info/texlive-latex-recommended.postrm
/var/lib/dpkg/info/texlive-latex3.list
/var/lib/dpkg/info/texlive-latex3.postrm
/var/lib/dpkg/info/texlive-luatex.list
/var/lib/dpkg/info/texlive-luatex.postrm
/var/lib/dpkg/info/texlive-math-extra.list
/var/lib/dpkg/info/texlive-math-extra.postrm
/var/lib/dpkg/info/texlive-metapost-doc.list
/var/lib/dpkg/info/texlive-metapost-doc.postrm
/var/lib/dpkg/info/texlive-metapost.list
/var/lib/dpkg/info/texlive-metapost.postrm
/var/lib/dpkg/info/texlive-music.list
/var/lib/dpkg/info/texlive-music.postrm
/var/lib/dpkg/info/texlive-omega.list
/var/lib/dpkg/info/texlive-omega.postrm
/var/lib/dpkg/info/texlive-pictures-doc.list
/var/lib/dpkg/info/texlive-pictures-doc.postrm
/var/lib/dpkg/info/texlive-pictures.list
/var/lib/dpkg/info/texlive-pictures.postrm
/var/lib/dpkg/info/texlive-plain-extra.list
/var/lib/dpkg/info/texlive-plain-extra.postrm
/var/lib/dpkg/info/texlive-pstricks-doc.list
/var/lib/dpkg/info/texlive-pstricks-doc.postrm
/var/lib/dpkg/info/texlive-pstricks.list
/var/lib/dpkg/info/texlive-pstricks.postrm
/var/lib/dpkg/info/texlive-publishers-doc.list
/var/lib/dpkg/info/texlive-publishers-doc.postrm
/var/lib/dpkg/info/texlive-publishers.list
/var/lib/dpkg/info/texlive-publishers.postrm
/var/lib/dpkg/info/texlive-science-doc.list
/var/lib/dpkg/info/texlive-science-doc.postrm
/var/lib/dpkg/info/texlive-science.list
/var/lib/dpkg/info/texlive-science.postrm
/var/lib/dpkg/info/texlive-xetex.list
/var/lib/dpkg/info/texlive-xetex.postrm
maria@marysia-ubuntu:~$

I've used sudo apt-get autoclean without any change. I've installed deborphan and it showed nothing (maybe I've used it in wrong way: just entered command deborphan). Am I doing something wrong or I was told something which is not true?

I would like to know two things: how to remove packages (if I'm doing it in wrong way) and how to clean hard disc from remains of all packages I've uninstalled till now (even if I don't remember what it was exactly). I have Ubuntu Tweak installed but I don't know how to use it and I think I prefere terminal commnands.

Thanks

1

2 Answers 2

9

apt-get autoclean will just remove old versions from the package archive, but won't change anything for installed packages.

To remove a package use sudo apt-get purge package. This should uninstall any dependencies, but won't full remove them. I use the command aptitude purge ~c to `.clean all uninstalled packages.

Even purged packages may leave behind data files and backup files. Backups should be a directory under in /var/backup. Data files will likely be in /var/lib. I would backup the data files before removing them in case some other application uses them. You may want to grep the data file directory in /var/lib/dpkg/info. If any files use the directory, then keep it. For example to find which packages installed use /var/lib/ldap, I run the search grep -l /var/lib/ldap /var/lib/info/dpkg/*. If you have a lots off packages you may need to use find /var/lib/dpkg/info | xargs grep -l /var/lib/ldap.

EDIT: You can list all programs which could be marked as automatically installed with the command aptitude search '~i!~M?for x: ~D( ~i!~M )'. Pipe this to the commands 'cut -d\ -f4 | sudo aptitude markauto` to mark these packages as auto-installed.

I then use the command aptitude search '~i!~M' (installed, not automatically installed) to list all the first order installed packages. WARNING: When removing packages, you may uninstall packages you want to keep. Simulate the removal first, and unmarkauto any packages you want to keep before run the real removal.

EDIT2: Above instructions includes packages suggested by other packages as first level packages. To list these use the command aptitude search '~i!~M?for x: ~Rsuggests:( ~i!~M )'. If desired, these can be marked using the same pipeline as for other dependencies. However, you must configure suggested packages to be automatically installed, or all the suggested packages and their depencies will be automatically uninstalled. This is done by adding the line APT::Install-Suggests "true"; to /etc/apt/apt.conf or a file in /etc/apt/apt.conf.d.

Dependencies may lead to unexpected selections for first level packages. If neither wordpress is marked wordpress-l10n then wordpress-l10n is considered the first level install. Normally wordpress-l10n would be marked as automatically installed, so this would not be a problem. You will likely get a lot of cruft this way.

13
  • @BillThor: Thanks a lot. I was using to remove autoremove; autoclean was just while I was trying to clean the remains of uninstalled packages. I'll try to remove by purge ~c (it's ~, not -?) in the future. Maybe I was not clear, I wanted to know if there is any command which will list all what seems to be unnecessary so I could check and remove what should be removed. I can't check with grep each package... And what about content of /etc/texmf/hyphen.d/ ?
    – maria
    Feb 27, 2011 at 1:02
  • 1
    maria@marysia-ubuntu:~$ find /var/lib/dpkg/info | xargs grep -l /var/lib/ldap maria@marysia-ubuntu:~$ - does it mean that non application uses the files in that directory and it can be safely removed? It would be strange, because I've installed texlive (but not -full this time) after removing it, so some of them should be used... The list I've posted is done after removing texlive-full but before installing texlive.
    – maria
    Feb 27, 2011 at 1:11
  • Added details on marking packages required by other installed packages. This allows easy listing of first order installed packages. This includes ubuntu-minimal and ubuntu-desktop. I don't expect texlive to have any data directories, but tools like ldap, apache, and some other require data to do their work. I also missed possible log files that may be left behind. This applies mainly to daemon processes rather than applications. Sorry if I may have mislead you with extra information. Answering questions forces me to review what I know.
    – BillThor
    Feb 27, 2011 at 2:12
  • Added some details on suggested packages as first level installs, and dependency cycles giving unexpected results.
    – BillThor
    Feb 27, 2011 at 2:52
  • 1
    Normally, you can just remove the package. If you still have problems use purge to remove it. I generally limit user of purge ~c to cleanup auto-removed packages. If you get a package in uppercase C state, dpkg --configure -a should fix it.
    – BillThor
    Mar 1, 2011 at 15:44
0

You can use synaptic to do most of the stuff @BillThor have listed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .