• Re: [gentoo-user] perl-cleaner --reallyall and leftover files, that I d

    From Michael@21:1/5 to All on Mon Feb 10 10:01:04 2025
    On Sunday 9 February 2025 23:46:08 Greenwich Mean Time Dale wrote:
    Howdy,

    It was mentioned a while ago in a thread that running perl-cleaner --reallyall on occasion is a good idea. It makes sure everything is
    stable.

    Well, not everything, but everything related to files linked against older versions of libperl.


    So, it hit me, I haven't ran it in a while, month or so. When
    I did, it re-emerged a lot of packages like it usually does. Then it
    listed a large list of leftover files.

    Were all these files found in a directory belonging to an older version of perl? For example, the current perl is /usr/lib64/perl5, so you'll have files like:

    /usr/lib64/libperl.so.5.40.0

    and symlinks to it from your perl5 directory, e.g.:

    ~ $ ls -la /usr/lib64/perl5/5.40/x86_64-linux/CORE/libperl.so.5.40
    lrwxrwxrwx 1 root root 29 Jan 19 11:55 /usr/lib64/perl5/5.40/x86_64-linux/ CORE/libperl.so.5.40 -> ../../../../libperl.so.5.40.0


    If it were just a few, I'd use
    equery and such to see what belonged to what and if it was safe to
    remove them. Thing is, it is quite a long list. It could take me days
    to check each one. I found a old thread that talked about a delete
    option. I check the man page, that option is no longer listed so I
    guess it is no longer available.

    So, what is the correct way to deal with these and be safe? Obviously I don't want to remove something the system needs. I also don't want a
    growing list of files that are no longer needed hanging around either.

    If the files you're concerned about are under a directory belonging to a previous version of perl , e.g. perl4, then you can remove the lot after you run perl-cleaner.


    While at it, is there a way to remove any files that doesn't belong to a package? A system wide clean up if you will.

    Thanks.

    Dale

    :-) :-)

    There was some old script to remove cruft, but I have never used it. I think as Gentoo matured over the years, files left behind when you uninstall a package have become less likely.

    There is 'qfile -o ...' you can use with 'find' to identify any orphan files left in your system, but it assumes you know what types of files to search
    for, e.g. "*.la". Have a look at the examples in the man page, to see how it can be used.
    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmepzmEACgkQseqq9sKV ZxmbCxAAxtNZ4UqWXGgOymFmo+jUha5JJiPxRrTG9A2pjP5Z4u1bblT3aYtm20K2 l43P5FPSefvv56xurQFmzGQLB3TXfZlWVrCzdumm+kE1I45+d19TB4r5VSvD5tn3 CR4jw/3p8GbzdRBqImQxdQwt089NCG7cAzOU/VmRKcVQqjjkDwI9v8p7Kjqb/+e0 Cru8AOZ1dJy20OlW2Mc2dkwiJWfnXcTsZJGhfrhdFTx7P5dDs2O7GfgAquR8fv9L GC+6YsAIPlmGWGSH+aFkmDlYrbHTgDpWqeYUHBynGa3SB+IquJkpXKFNbF7e+2co B5z1V6vsOEXIv67opfGWS4kDuYHMSHiXAtxcvswqVG7mzaVPPBCGNqe9KgMJ6PsB 3KdTU1/sHttI9i9y/zAvn7PvAaeifNUoslcw3V4pBAI1uqyikbs+5EesYdP+aieu /q3bRG4Da0nVKj/rG3CmKwwboyZ/jvXthasNV/og+LiMqrR+CjIZKilEaJatEOZq rnlF10pAN/9RmqXxTbQtQDfNU3AZyUrcRjegXO29jBEEbaisXrelpdnNMnrh3iLw /dgPxpavh21c51oAybX2OcEVxsPjO0z6xwVkjuY/Ap5liglzepsUZcGy8D3j/5gr JLpF8In/m3mD2uyus7KrFc9hUK2aDFXd3H+gFYB9vknNP/hEj/g=
    =q7+G
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael@21:1/5 to All on Mon Feb 10 11:15:22 2025
    On Monday 10 February 2025 10:53:26 Greenwich Mean Time Dale wrote:

    This is the perl I have installed.


    dev-lang/perl-5.40.0-r1:0/5.40


    I'm not going to list all the stuff it spit out. Just going to include enough that you get the idea.


    * /usr/lib64/perl5/5.40/Parse/CPAN/Meta.pm
    * /usr/lib64/perl5/5.40/Config/Perl/V.pm
    * /usr/lib64/perl5/5.40/Config/Extensions.pm
    ...

    These look legit files installed by portage for your perl 5.40 slot. The message I received after perl-cleaner finished its job was: =========================================
    * GNU info directory index is up-to-date.
    *
    * It seems like perl-cleaner had to rebuild some packages.
    *

    * The following files remain. These were either installed by hand
    * or edited.

    * /usr/lib64/perl5/vendor_perl/5.40/x86_64-linux/auto/Regexp/ IPv6/.packlist
    * /usr/lib64/perl5/vendor_perl/5.40/x86_64-linux/auto/File/Temp/.packlist
    * /usr/lib64/perl5/vendor_perl/5.40/x86_64-linux/auto/File/ Which/.packlist
    * /usr/lib64/perl5/vendor_perl/5.40/x86_64-linux/auto/File/ chdir/.packlist
    [snip ...]
    ===============

    They are all listed under /usr/lib64/perl5/. Say you want to check if these are really orphaned files no longer owned by any installed package, you can run:

    ~ $ qfile -o $(find /usr/lib /usr/lib64 -name "*.packlist")
    ~ $
    ~ $ qfile -o $(find /usr/lib /usr/lib64 -name "*.pm")
    ~ $
    ~ $ qfile -o $(find /usr/lib /usr/lib64 -name "*.pod")
    ~ $
    ~ $ qfile -o $(find /usr/lib /usr/lib64 -name "*.pl")
    ~ $

    and so on. In my example above I did not discover any orphans.


    They appear to be for the current installed versions. That's one reason
    it is kinda confusing. o_O

    I see what you mean, the message "... These were either installed by hand or edited" can be confusing, because all these perl5 files were installed by portage and perl was invariably brought in as a dependency by some other @system or @world package.

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmep38oACgkQseqq9sKV ZxmHYA/+MprGjkW+aYqCKS3fvW13Zxjcb9t3wbE7gH7F8hsWOJ+zGade4Sx7+1x9 ej2uJm9g0BgnBp+IQ6zgXnBgN16ckdsIEzwQnvaexCLRB21oGPbVZdU3I08M/II7 YdKXo40Rr+rf7Oo/pw0nAFjPj/4X35OEX4R2ffO1diV3Rx3PJgFlaDL3MuNJz1Po 2gBPgQgyiygOojt/2i/0jRhSDg8b3NutWI6oLV+KOMyS/tPgp58AgjObIGqXeR0s bC2aqy7YYOLCxR0iw1ESVWdzvKreTWh+yCUTWhlyw+geUd6DiEsVkNt5b/MHpSoN R6lkcItC+AtDe6dBhRysm913sUG/OUbm4iVO8SiM29zvitTLUjudOL6hOWkeuwv/ 7b8/gwSnYHgEJGx+UStyaQ1Z6WtBRAI8QhpoWJV6uzKMO1buoyukdN6/Uvcp3iY/ JcpCGYwoO1ltN5S3Thlp1+Tm5lgzPRBKeeYd3Gx+5du1AmvwyxpjRdno4YZnHiKt APYg4vuS/Lv0A05FFybIvEGVLPUzZ2gMoUCXX+AdfUvM1tIWkfwV/KZ+Ydi6UK5c vhSt5NktzFjG3dz+jsry0DFAHQVvB5RBbwd9BlfuL+oFrF3xq/EqH/u6t2vq+q6A zXppB8Tp+9DfO71TxzrGW5C7ejPZe8mBLZdgXPwZPYpUODlAwsU=
    =ckd/
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)