Script de suppression

Bonjour à tous, c’est encore moi ^^

J’ai lu dans le forum “Astuces”, que l’on pouvait utiliser la commande suivante pour lister les fichiers de configurations orphelins.

root@Debian:/home/sacha# dpkg -l | grep ^rc 
rc  3dchess                              0.8.1-17                          Play chess across 3 boards!
rc  akonadi-backend-mysql                1.5.3-2                           MySQL storage backend for Akonadi
rc  akonadi-server                       1.5.3-2                           Akonadi PIM storage service
rc  akregator                            4:4.4.11.1+l10n-1                 RSS/Atom feed aggregator
rc  ark                                  4:4.6.5-2                         archive utility
rc  bastille                             1:3.0.9-13                        Security hardening tool
rc  bsh                                  2.0b4-12                          Java scripting environment (BeanShell) Version 2
rc  bsh-gcj                              2.0b4-12                          Java scripting environment (BeanShell) Version 2 (native code)
rc  clamtk                               4.32-1                            graphical front-end for ClamAV
rc  cups-pk-helper                       0.1.2-1                           PolicyKit helper to configure cups with fine-grained privileges
rc  dolphin                              4:4.6.5-1                         file manager
rc  dragonplayer                         4:4.6.5-3                         simple video player
rc  exim4                                4.76-3                            metapackage to ease Exim MTA (v4) installation
rc  fwbuilder                            5.0.0-1                           Firewall administration tool GUI
rc  google-gadgets-common                0.11.2-5                          Common files for Qt and GTK+ versions of google-gadgets
rc  google-gadgets-qt                    0.11.2-5                          Qt4 version of Google Gadgets
rc  gparted                              0.8.1-1                           GNOME partition editor
rc  gwenview                             4:4.6.5-3                         image viewer
rc  htdig                                1:3.2.0b6-10                      web search and indexing system - binaries
rc  jovie                                4:4.6.5-1                         text-to-speech system for KDE
rc  kaddressbook                         4:4.4.11.1+l10n-1                 address book and contact data manager
rc  kate                                 4:4.6.5-1                         K Advanced Text Editor
rc  kdelibs4c2a                          4:3.5.10.dfsg.1-5                 core libraries and binaries for all KDE applications
rc  kdm                                  4:4.6.5-2                         KDE Display Manager for X11
rc  kget                                 4:4.6.5-2                         download manager
rc  kleopatra                            4:4.4.11.1+l10n-1                 certificate Manager
rc  kmail                                4:4.4.11.1+l10n-1                 full featured graphical email client
rc  konq-plugins                         4:4.6.1-1                         plugins for Konqueror, the KDE file/web/document browser
rc  konqueror                            4:4.6.5-1                         advanced file manager, web browser and document viewer
rc  kopete                               4:4.6.5-2                         instant messaging and chat application
rc  korganizer                           4:4.4.11.1+l10n-1                 calendar and personal organizer
rc  ksysguard                            4:4.6.5-2                         process monitor and system statistics
rc  ksysguardd                           4:4.6.5-2                         System Guard Daemon
rc  libakonadi-contact4                  4:4.6.5-1                         library for using the Akonadi PIM data server
rc  libakonadi-kabc4                     4:4.6.5-1                         library for using the Akonadi PIM data server
rc  libakonadi-kcal4                     4:4.6.5-1                         library for using the Akonadi PIM data server
rc  libakonadi-kmime4                    4:4.6.5-1                         library for using the Akonadi PIM data server
rc  libakonadiprotocolinternals1         1.5.3-2                           libraries for the Akonadi PIM storage service
rc  libattica0                           0.2.0-1                           Qt library that implements the Open Collaboration Services API
rc  libcln6                              1.3.2-1+b1                        Class Library for Numbers (C++)
rc  libclucene0ldbl                      0.9.21b-2+b1                      library for full-featured text search engine (runtime)
rc  libdbusmenu-qt2                      0.9.0-1                           Qt implementation of the DBusMenu protocol
rc  libdlrestrictions1                   0.14.2                            library that implements library compatibility checks for dlopen()
rc  libdmtx0a                            0.7.2-1+b2                        Data Matrix barcodes (runtime library)
rc  libdotconf1.0                        1.0.13-3                          Configuration file parser library - runtime files
rc  libgadu3                             1:1.11.0-2                        Gadu-Gadu protocol library - runtime files
rc  libggadget-1.0-0b                    0.11.2-5                          Google Gadgets main library
rc  libggadget-qt-1.0-0b                 0.11.2-5                          Google Gadgets Qt library
rc  libgpgme++2                          4:4.6.5-1                         c++ wrapper library for gpgme
rc  libgps19                             2.95-13.1                         Global Positioning System - library
rc  libgraphicsmagick3                   1.3.12-1.1                        format-independent image processing - C shared library
rc  libgraphite3                         1:2.3.1-0.2                       SILGraphite - a "smart font" rendering engine
rc  libiodbc2                            3.52.7-2                          iODBC Driver Manager
rc  libkabc4                             4:4.6.5-1                         library for handling address book data
rc  libkatepartinterfaces4               4:4.6.5-2                         kate part library
rc  libkblog4                            4:4.6.5-1                         client-side support library for web application remote blogging APIs
rc  libkcal4                             4:4.6.5-1                         library for handling calendar data
rc  libkcalcore4                         4:4.6.5-1                         library for handling calendar data
rc  libkcalutils4                        4:4.6.5-1                         library with utility functions for the handling of calendar data
rc  libkcmutils4                         4:4.6.5-2                         utility classes for using KCM modules
rc  libkdnssd4                           4:4.6.5-2                         DNS-SD Protocol Library for the KDE Platform
rc  libkemoticons4                       4:4.6.5-2                         utility classes to deal with emoticon themes
rc  libkephal4abi1                       4:4.6.5-2                         API for easier handling of multihead systems
rc  libkexiv2-9                          4:4.6.5-3                         Qt like interface for the libexiv2 library (runtime)
rc  libkfile4                            4:4.6.5-2                         File Selection Dialog Library for KDE Platform
rc  libkholidays4                        4:4.6.5-1                         holidays calculation library
rc  libkhtml5                            4:4.6.5-2                         KHTML Web Content Rendering Engine
rc  libkidletime4                        4:4.6.5-2                         library to provide information about idle time
rc  libkimap4                            4:4.6.5-1                         library for handling IMAP data
rc  libkimproxy4                         4:4.6.5-2                         Instant Messaging Interface Library for the KDE Platform
rc  libkio5                              4:4.6.5-2                         Network-enabled File Management Library for the KDE Platform
rc  libkipi8                             4:4.6.5-3                         library for apps that want to use kipi-plugins (runtime version)
rc  libkjsapi4                           4:4.6.5-2                         KJS API Library for the KDE Development Platform
rc  libkjsembed4                         4:4.6.5-2                         library for binding JavaScript objects to QObjects
rc  libkldap4                            4:4.6.5-1                         library for accessing LDAP
rc  libkleo4                             4:4.4.11.1+l10n-1                 certificate based crypto library
rc  libkmediaplayer4                     4:4.6.5-2                         KMediaPlayer Interface for the KDE Platform
rc  libkmime4                            4:4.6.5-1                         library for handling MIME data
rc  libknewstuff2-4                      4:4.6.5-2                         "Get Hot New Stuff" v2 Library for the KDE Platform
rc  libknewstuff3-4                      4:4.6.5-2                         "Get Hot New Stuff" v3 Library for the KDE Platform
rc  libknotifyconfig4                    4:4.6.5-2                         library for configuring KDE Notifications
rc  libkntlm4                            4:4.6.5-2                         NTLM Authentication Library for the KDE Platform
rc  libkonq5abi1                         4:4.6.5-1                         core libraries for Konqueror
rc  libkonqsidebarplugin4a               4:4.6.5-1                         konqueror sidebar plugin library
rc  libkontactinterface4                 4:4.6.5-1                         Kontact interface library
rc  libkopete4                           4:4.6.5-2                         main Kopete library
rc  libkparts4                           4:4.6.5-2                         Framework for the KDE Platform Graphical Components
rc  libkpgp4                             4:4.4.11.1+l10n-1                 gpg based crypto library
rc  libkpimidentities4                   4:4.6.5-1                         library for managing user identities
rc  libkpimtextedit4                     4:4.6.5-1                         library that provides a textedit with PIM-specific features
rc  libkpimutils4                        4:4.6.5-1                         library for dealing with email addresses
rc  libkprintutils4                      4:4.6.5-2                         utility classes to deal with printing
rc  libkpty4                             4:4.6.5-2                         Pseudo Terminal Library for the KDE Platform
rc  libkresources4                       4:4.6.5-1                         KDE Resource framework library
rc  libkrosscore4                        4:4.6.5-2                         Kross Core Library
rc  libkscreensaver5                     4:4.6.5-2                         library of the KDE Screensaver system
rc  libksgrd4                            4:4.6.5-2                         library for ksysguard
rc  libksieve4                           4:4.4.11.1+l10n-1                 mail/news message filtering library
rc  libksignalplotter4                   4:4.6.5-2                         KSignalPlotter widget
rc  libktexteditor4                      4:4.6.5-2                         KTextEditor interfaces for the KDE Platform
rc  libktnef4                            4:4.6.5-1                         library for handling TNEF data
rc  libktorrent3                         1.1.1-2                           KTorrent library for C++ / Qt 4 / KDE Platform
rc  libkunitconversion4                  4:4.6.5-2                         Unit Conversion library for the KDE Platform
rc  libkutils4                           4:4.6.5-2                         dummy transitional library
rc  libkwineffects1abi1                  4:4.6.5-2                         library used by effects for the KDE window manager
rc  libkxmlrpcclient4                    4:4.6.5-1                         simple XML-RPC client library
rc  liblzo2-2                            2.05-2                            data compression library
rc  libmailtransport4                    4:4.6.5-1                         mail transport service library
rc  libmarblewidget11                    4:4.6.5-1                         Marble globe widget library
rc  libmeanwhile1                        1.0.2-4                           open implementation of the Lotus Sametime Community Client protocol
rc  libmediastreamer0                    3.3.2-4.1+b1                      linphone web phone's media library
rc  libmessagecore4                      4:4.4.11.1+l10n-1                 message core library
rc  libmessagelist4                      4:4.4.11.1+l10n-1                 message list library
rc  libmicroblog4                        4:4.6.5-1                         library for using the Microblog Akonadi Resource
rc  libmimelib4                          4:4.4.11.1+l10n-1                 MIME library
rc  libmsn0.3                            4.1-3                             high-level C++ library for MSN Messenger [runtime]
rc  libmysqlclient16                     5.1.58-1                          MySQL database client library
rc  libnepomuk4                          4:4.6.5-2                         Nepomuk Meta Data Library
rc  libnepomukquery4a                    4:4.6.5-2                         Nepomuk Query Library for the KDE Platform
rc  libnepomukutils4                     4:4.6.5-2                         Nepomuk Utility Library
rc  libntrack-qt4-1                      008-1                             qt4 API for ntrack
rc  libntrack0                           008-1                             lightweight connectivity tracking library
rc  libokularcore1                       4:4.6.5-3                         libraries for the Okular document viewer
rc  libortp8                             3.3.2-4.1+b1                      Real-time Transport Protocol stack
rc  libotr2                              3.2.0-2.1                         Off-the-Record Messaging library
rc  libphonon4                           4:4.6.0really4.5.0-4              multimedia framework from KDE - core library
rc  libpkcs11-helper1                    1.08-1                            library that simplifies the interaction with PKCS#11
rc  libplasma-geolocation-interface4     4:4.6.5-2                         library for the Plasma geolocation
rc  libplasma3                           4:4.6.5-2                         Plasma Library for the KDE Platform
rc  libplasmaclock4abi1                  4:4.6.5-2                         library for Plasma clocks
rc  libplasmagenericshell4               4:4.6.5-2                         shared elements for all the plasma shells
rc  libpolkit-qt-1-1                     0.99.0-3                          PolicyKit-qt-1 library
rc  libpoppler-qt4-3                     0.16.7-2                          PDF rendering library (Qt 4 based shared library)
rc  libpostproc51                        4:0.6.2-5                         Libav video postprocessing library
rc  libprocesscore4abi1                  4:4.6.5-2                         library for ksysguard based process view
rc  libprocessui4a                       4:4.6.5-2                         library for ksysguard process user interface
rc  libqalculate5                        0.9.7-5                           Powerful and easy to use desktop calculator - library
rc  libqca2                              2.0.3-2                           libraries for the Qt Cryptographic Architecture
rc  libqgpgme1                           4:4.6.5-1                         library for GpgME++ integration with Qt
rc  libqimageblitz4                      1:0.0.6-4                         QImageBlitz image effects library
rc  libqt4-declarative                   4:4.7.3-5                         Qt 4 Declarative module
rc  libqt4-help                          4:4.7.3-5                         Qt 4 help module
rc  libqt4-qt3support                    4:4.7.3-5                         Qt 3 compatibility library for Qt 4
rc  libqt4-scripttools                   4:4.7.3-5                         Qt 4 script tools module
rc  libqt4-test                          4:4.7.3-5                         Qt 4 test module
rc  libqt4-xmlpatterns                   4:4.7.3-5                         Qt 4 XML patterns module
rc  libqtassistantclient4                4.6.3-3                           Qt Assistant client library (runtime)
rc  libqtlocation1                       1.2.0-1                           Qt Mobility Location module
rc  libqtmultimediakit1                  1.2.0-1                           Qt Mobility MultimediaKit module
rc  libqtruby4shared2                    4:4.4.5-7                         internal library for Qt Ruby bindings
rc  libqtwebkit4                         2.1.0~2011week13-2                Web content engine library for Qt
rc  libqzeitgeist0                       0.7.0-1                           wrapper library around the Zeitgeist DBus API for Qt
rc  libraptor1                           1.4.21-6                          Raptor RDF parser and serializer library
rc  libreoffice-gcj                      1:3.4.3-1                         office productivity suite -- Java libraries for GIJ
rc  libscim8c2a                          1.4.9-6                           library for SCIM platform
rc  libsmokekfile3                       4:4.4.5-7                         KFile SMOKE library
rc  libsmokekhtml3                       4:4.4.5-7                         KHTML SMOKE library
rc  libsmokekio3                         4:4.4.5-7                         KIO SMOKE library
rc  libsmokeknewstuff2-3                 4:4.4.5-7                         KNewStuff2 SMOKE library
rc  libsmokeknewstuff3-3                 4:4.4.5-7                         KNewStuff3 SMOKE library
rc  libsmokekparts3                      4:4.4.5-7                         KParts SMOKE libraries
rc  libsmokektexteditor3                 4:4.4.5-7                         KTextEditor SMOKE libraries
rc  libsmokekutils3                      4:4.4.5-7                         KUtils SMOKE libraries
rc  libsmokenepomuk3                     4:4.4.5-7                         Nepomuk SMOKE libraries
rc  libsmokephonon3                      4:4.4.5-7                         Qt Phonon SMOKE library
rc  libsmokeplasma3                      4:4.4.5-7                         Plasma SMOKE library
rc  libsmokeqtcore4-3                    4:4.4.5-7                         Qt Core SMOKE library
rc  libsmokeqtdbus4-3                    4:4.4.5-7                         Qt D-Bus SMOKE library
rc  libsmokeqtgui4-3                     4:4.4.5-7                         Qt Gui SMOKE library
rc  libsmokeqtnetwork4-3                 4:4.4.5-7                         Qt Network SMOKE library
rc  libsmokeqtopengl4-3                  4:4.4.5-7                         Qt OpenGL SMOKE library
rc  libsmokeqtscript4-3                  4:4.4.5-7                         Qt Script SMOKE library
rc  libsmokeqtsql4-3                     4:4.4.5-7                         Qt Sql SMOKE library
rc  libsmokeqtsvg4-3                     4:4.4.5-7                         Qt Svg SMOKE library
rc  libsmokeqttest4-3                    4:4.4.5-7                         Qt Test SMOKE library
rc  libsmokeqtuitools4-3                 4:4.4.5-7                         Qt Ui Tools SMOKE library
rc  libsmokeqtwebkit4-3                  4:4.4.5-7                         Qt WebKit SMOKE library
rc  libsmokeqtxml4-3                     4:4.4.5-7                         Qt Xml SMOKE library
rc  libsmokesolid3                       4:4.4.5-7                         Solid SMOKE libraries
rc  libsmokesoprano3                     4:4.4.5-7                         Soprano SMOKE library
rc  libsolid4                            4:4.6.5-2                         Solid Library for KDE Platform
rc  libsolidcontrol4abi1                 4:4.6.5-2                         library for Solid based network management
rc  libsolidcontrolifaces4abi1           4:4.6.5-2                         library for Solid based network interface management
rc  libsoprano4                          2.6.0+dfsg.1-4                    libraries for the Soprano RDF framework
rc  libspeechd2                          0.7.1-6                           Speech Dispatcher: Shared libraries
rc  libstreamanalyzer0                   0.7.2-1+b1                        streamanalyzer library for Strigi Desktop Search
rc  libstreams0                          0.7.2-1+b1                        streams library for for Strigi Desktop Search
rc  libsyndication4                      4:4.6.5-1                         parser library for RSS and Atom feeds
rc  libtaskmanager4abi1                  4:4.6.5-2                         library which provides task management facilities
rc  libthreadweaver4                     4:4.6.5-2                         ThreadWeaver Library for the KDE Platform
rc  libtunepimp5                         0.5.3-7.4                         MusicBrainz tagging library
rc  libvirtodbc0                         6.1.3+dfsg1-1                     high-performance database - ODBC libraries
rc  libweather-ion6                      4:4.6.5-2                         library which provides an interface for weather information services
rc  libxine1-bin                         1.1.19-3                          the xine video/media player library, binary files
rc  mysql-common                         5.1.58-1                          MySQL database common files, e.g. /etc/mysql/my.cnf
rc  network-manager-openvpn              0.8.4-1                           network management framework (OpenVPN plugin core)
rc  network-manager-pptp                 0.8.4-1                           network management framework (PPTP plugin core)
rc  network-manager-vpnc                 0.8.4-1                           network management framework (VPNC plugin core)
rc  nfs-common                           1:1.2.4-1                         NFS support files common to client and server
rc  odbcinst                             2.2.14p2-3                        Helper program for accessing odbc ini files
rc  odbcinst1debian2                     2.2.14p2-3                        Support library for accessing odbc ini files
rc  okular                               4:4.6.5-3                         universal document viewer
rc  openvpn                              2.2.0-2                           virtual private network daemon
rc  oxygen-icon-theme                    4:4.6.2-2                         Oxygen icon theme
rc  phonon                               4:4.6.0really4.5.0-4              multimedia framework from KDE - metapackage
rc  plasma-containments-addons           4:4.6.5-1                         additional containment plugins for Plasma
rc  plasma-dataengines-addons            4:4.6.5-1                         additional data engines for Plasma
rc  plasma-scriptengine-superkaramba     4:4.6.5-2                         SuperKaramba theme support for the Plasma Workspaces
rc  plasma-widget-lancelot               4:4.6.5-1                         lancelot widget for Plasma
rc  plasma-widget-networkmanagement      0.1+git20110727.96f5505-1         Network Management widget for KDE Plasma workspaces
rc  plasma-widgets-addons                4:4.6.5-1                         additional widgets for Plasma
rc  plasma-widgets-workspace             4:4.6.5-2                         plasma widgets and containments for the KDE Plasma Workspace
rc  pptp-linux                           1.7.2-6                           Point-to-Point Tunneling Protocol (PPTP) Client
rc  psad                                 2.1.7-1                           Port Scan Attack Detector
rc  rpcbind                              0.2.0-6                           converts RPC program numbers into universal addresses
rc  speech-dispatcher                    0.7.1-6                           Common interface to speech synthesizers
rc  systemsettings                       4:4.6.5-2                         System Settings
rc  telnet                               0.17-36                           The telnet client
rc  vpnc                                 0.5.3r449-2.1                     Cisco-compatible VPN client
rc  wicd-daemon                          1.7.0+ds1-6                       wired and wireless network manager - daemon
rc  wicd-gtk                             1.7.0+ds1-6                       wired and wireless network manager - GTK+ client
rc  xaw3dg                               1.5+E-18                          Xaw3d widget set
rc  xscreensaver-gl                      5.14-1                            GL(Mesa) screen hacks for xscreensaver
root@Debian:/home/sacha# 

Comment tout supprimer ?

Salut,

Passes donc jeter un œil (voir deux) le wiki Nettoyer sa Debian:083

Un lien vers le sujet en question nous aurait permis de voir à quoi tu faisais référence… :wink:
Vu que j’ai la flemme de fouiller, je vais essayer de deviner !

Si je ne me trompe pas, le résultat de la commande suivante devrait te retourner la même liste de paquets (vérifie avant de faire la suite) :

Auquel cas, la commande suivante te permettra de les nettoyer :

Tu peux aussi aller lire ce T&A, il y aura peut-être des choses qui t’intéresseront : aptitude-gestion-des-dependances-et-orphelins-t35575.html

[quote=“loreleil.747”]Salut,

Passes donc jeter un œil (voir deux) le wiki Nettoyer sa Debian:083[/quote]

Ma foi le lien est inclus, suffisait de cliqué dessus … :033

-edit-

Autant pour moi, tu faisait référence à ceci …

# dpkg -l | grep ^rc 

Plates excuses … :wink:

-edit-1

[quote=“syam”]Je sais, on devrait avoir l’habitude maintenant, mais le fait est que non…

[/quote]

Et bien non ! C’était belle et bien à mon lien que tu faisait allusion … Clic ! :005

@Niloo : effectivement… mais pourquoi faire simple quand on peut faire compliqué ? :smiley: :blush:

Encore faut-il le voir, le lien… :confused:
Je sais, on devrait avoir l’habitude maintenant, mais le fait est que non…

Oups, désolé, le lien est là : procedure-pour-nettoyer-sa-debian-t3826-25.html

C’est ici que j’ai trouvé cette astuce.

Edit: aptitude purge ~c a marché nickel :smiley:

# aptitude purge $(aptitude search '~c' -F '%p')

Pourrais-je avoir les détails de cette commande ?

aptitude search ‘~c’ -F ‘%p’ recherche les paquets désinstallés encore configurés (~c) en les affichant uniquement sous forme de nom de paquets (-F ‘%p’).
La syntaxe $(…) exécute la commande qui est à l’intérieur, et est en quelque sorte “remplacée” par la sortie (stdout) de ladite commande.
Puis la commande extérieure (aptitude purge) est exécutée avec les nouveaux paramètres (le $() remplacé par le stdout de la commande à l’intérieur).

Si tu préfères, c’est équivalent à :

[code]# aptitude search ‘~c’ -F ‘%p’
paquet_1
paquet_2
paquet_3

aptitude purge paquet_1 paquet_2 paquet_3[/code]

Bien entendu dans ce cas de figure c’est complètement redondant, un simple aptitude purge ~c est équivalent.
Pour ma défense, je dirai juste que j’ai récemment remis le nez dans mon script de gestion de dépendances (le lien que je t’ai donné) qui utilise beaucoup $() pour capturer dans des variables shell la sortie de commandes ou de fonctions, ce qui m’a probablement perturbé mon petit cerveau. :033

Hello syam,

Tu n’as pas à te défendre tu sais :wink:

Dis moi, où as-tu appris à scripter comme ça ? J’ai beau chercher à apprendre le plus poossible, il n’y a quand mettant le bronx sur ma Debian que j’arrive à apprendre quelque chose…

Ça fait plus de 20 ans que je fous le bronx sur mes machines. :033
À tel point que c’est devenu mon métier : programmeur (principalement C++ parmi une dizaine d’autres langages).

[quote=“syam”]
Ça fait plus de 20 ans que je fous le bronx sur mes machines.
À tel point que c’est devenu mon métier : programmeur (principalement C++ parmi une dizaine d’autres langages).[/quote]

Génial :smiley:

Moi je dois commencer le C, mais j’ai vraiment du mal à m’y mettre…