Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic:  Debian packages cleanup  (Read 1395 times)

Offline Pirmin

  • User
  • Posts: 32
Debian packages cleanup
« on: 2022/03/12, 15:39:23 »
Hello,

in addition to apt autoremove and apt autoclean I would like to delete remaining configuration files with dpkg --list | grep '^rc ' . However, apparently there are inconsistencies on my end. Configurations are listed that I still need (e.g. LibreOffice, libvirt).

Code: [Select]
# dpkg --list | grep '^rc '
rc  catdoc                                        1:0.95-5                           amd64        text extractor for MS-Office files
rc  dc                                            1.07.1-3+b1                        amd64        GNU dc arbitrary precision reverse-polish calculator
rc  exim4-base                                    4.95-4                             amd64        support files for all Exim MTA (v4) packages
rc  exim4-config                                  4.95-4                             all          configuration for the Exim MTA (v4)
rc  libfakeroot:amd64                             1.28-1                             amd64        tool for simulating superuser privileges - shared libraries
rc  libkf5idletime5:amd64                         5.90.0-1                           amd64        library to provide information about idle time
rc  libpython3.10-minimal:amd64                   3.10.2-5                           amd64        Minimal subset of the Python language (version 3.10)
rc  libreoffice-gtk3                              1:7.3.1-1                          amd64        office productivity suite -- GTK+ 3 integration
rc  libreoffice-help-common                       1:7.3.1-1                          all          office productivity suite -- common files for LibreOffice help
rc  libreoffice-help-de                           1:7.3.1-1                          all          office productivity suite -- German help
rc  libreoffice-help-en-us                        1:7.3.1-1                          all          office productivity suite -- English_american help
rc  libreoffice-l10n-de                           1:7.3.1-1                          all          office productivity suite -- German language package
rc  libvirt-daemon-config-network                 8.0.0-1                            all          Libvirt daemon configuration files (default network)
rc  libvirt-daemon-config-nwfilter                8.0.0-1                            all          Libvirt daemon configuration files (default network filters)
rc  libxml-sax-perl                               1.02+dfsg-3                        all          Perl module for using and building Perl SAX2 XML processors
rc  python-matplotlib-data                        3.5.1-2                            all          Python based plotting system (data package)
rc  python3-sympy                                 1.9-1                              all          Computer Algebra System (CAS) in Python (Python 3)
rc  python3.10-minimal                            3.10.2-5                           amd64        Minimal subset of the Python language (version 3.10)
rc  sgml-base                                     1.30                               all          SGML infrastructure and SGML catalog file support
rc  sgml-data                                     2.0.11+nmu1                        all          common SGML and XML data
rc  tumbler-common                                4.16.0-1                           all          D-Bus thumbnailing service (common files)
rc  unixodbc-common                               2.3.9-5                            all          Common ODBC configuration files
rc  xml-core                                      0.18+nmu1                          all          XML infrastructure and XML catalog file support

There it lists me Libre Office and libvirtb, although that is installed on my system. Why? Are for apt or dpkg the help and language files nothing that comes with a normal installation and are marked as installed?


Online towo

  • Administrator
  • User
  • *****
  • Posts: 2.920
Re: Debian packages cleanup
« Reply #1 on: 2022/03/12, 15:45:01 »
Packages with status rc are clearly not needed anymore!
So with
Code: [Select]
dpkg --purge $(dpkg -l | awk '/^rc/{ print $2}')you get rid of that all.
Ich gehe nicht zum Karneval, ich verleihe nur manchmal mein Gesicht.

Offline Pirmin

  • User
  • Posts: 32
Re: Debian packages cleanup
« Reply #2 on: 2022/03/12, 16:06:56 »
I purged the files. Additional I used aptitude to search for more files that have no actually dependencies of packages.

Code: [Select]
aptitude search '?and( ?automatic(?reverse-recommends(?installed)), ?not(?automatic(?reverse-depends(?installed))) )'

aptitude search '?and( ?automatic(?reverse-recommends(?installed)), ?not(?automatic(?reverse-depends(?installed))) )'
i A ant-optional                              - Java-Buildwerkzeug ähnlich make - optionale Biblioth
i A fonts-crosextra-caladea                   - Serifen-Schrift, metrisch kompatibel mit Cambria   
i A fonts-crosextra-carlito                   - Serifenlose Schriftfamilie, metrisch kompatibel mit
i A fonts-dejavu                              - Metapaket zur Installation von fonts-dejavu-core und
i A fonts-linuxlibertine                      - Schriftenfamilie Linux Libertine                   
i A fonts-noto-extra                          - »No Tofu«-Schriftfamilien mit großer Unicode-Abdecku
i A fonts-sil-gentium                         - extended Unicode Latin font ("a typeface for the nat
i A fonts-sil-gentium-basic                   - smart Unicode font families (Basic and Book Basic) b
i A libreoffice-nlpsolver                     - »Löser für nichtlineare Programmierung« für LibreOff
i A libreoffice-report-builder                - LibreOffice-Komponente zum Erstellen von Datenbankbe
i A libreoffice-script-provider-bsh           - LibreOffice Scripting Framework - Unterstützung für
i A libreoffice-script-provider-js            - LibreOffice Scripting Framework - Unterstützung für
i A libreoffice-script-provider-python        - LibreOffice Scripting Framework - Unterstützung für
i A libreoffice-sdbc-mysql                    - MariaDB/MySQL-SDBC-Treiber für LibreOffice         
i A libreoffice-sdbc-postgresql               - PostgreSQL-SDBC-Treiber für LibreOffice             
i A libreoffice-wiki-publisher                - LibreOffice-Erweiterung für die Arbeit mit MediaWiki
i A lua-lgi                                   - Lua bridge to GObject based libraries               
i A yelp                                      - Hilfe-Browser für GNOME                   

If I purged the files with

Code: [Select]
aptitude search '?and( ?automatic(?reverse-recommends(?installed)), ?not(?automatic(?reverse-depends(?installed))) )' | awk '{ print $3 }' | sudo xargs dpkg -P


and it kills Libre Office. Is this a bug?