I have recently removed some packages with the use of globs: $ sudo apt remove libreoffice-*, $ sudo apt remove cheese*, $ sudo apt remove shotwell*
I cleaned things up with $ sudo apt autoremove as suggested. Then I got to thinking... what if I some dependency (loose or not) for some other installed package has been removed?
Is there a good series of commands that can check my packages for dependency errors? I have searched a bit, and all sites seem to suggest the same things: similar result, similar result, similar result, etc. Of course there is some variety with forums, such as Ask Ubuntu, but not a whole lot in my searches; a lot of it is 5+ year old stuff, which puts me off.
Any suggestions, guys?
[Solved] A process (script?) to check for broken packages
- FreewheelinFrank
- Global Moderator
- Posts: 2412
- Joined: 2010-06-07 16:59
- Has thanked: 45 times
- Been thanked: 266 times
Re: A process (script?) to check for broken packages
Code: Select all
# apt-get check
Code: Select all
# man apt-get
check
check is a diagnostic tool; it updates the package cache and checks
for broken dependencies.
Re: A process (script?) to check for broken packages
Thanks, @FreewheelinFrank. The command did not find any discrepancies.
It's probably not too wise to execute the remove command with a glob that way—libreoffice-*? There were several packages and dependencies that I removed because of that. I probably should have only removed libreoffice-core, then let apt handle business and see if autoremove was suggested. That may have been safer.
This is instinct of mine after 2 or so years on Linux (most of which was Fedora). I'm still a greenhorn—not much more than a week on Debian. Apt is really cool; I like it more than dnf, which was pretty neat, too.
It's probably not too wise to execute the remove command with a glob that way—libreoffice-*? There were several packages and dependencies that I removed because of that. I probably should have only removed libreoffice-core, then let apt handle business and see if autoremove was suggested. That may have been safer.
This is instinct of mine after 2 or so years on Linux (most of which was Fedora). I'm still a greenhorn—not much more than a week on Debian. Apt is really cool; I like it more than dnf, which was pretty neat, too.
- FreewheelinFrank
- Global Moderator
- Posts: 2412
- Joined: 2010-06-07 16:59
- Has thanked: 45 times
- Been thanked: 266 times
Re: A process (script?) to check for broken packages
You're welcome. The technical word for "glob" is metapackage. There is information here on what they are, consequences of removal, and how to avoid unintended removal of packages.
https://wiki.debian.org/metapackage
https://wiki.debian.org/DontBreakDebian ... e_software
https://wiki.debian.org/FAQsFromDebianU ... o.29remove
The forum has many topics on the subject. For example:
https://forums.debian.net/viewtopic.php?t=104157
https://wiki.debian.org/metapackage
https://wiki.debian.org/DontBreakDebian ... e_software
https://wiki.debian.org/FAQsFromDebianU ... o.29remove
The forum has many topics on the subject. For example:
https://forums.debian.net/viewtopic.php?t=104157
Re: A process (script?) to check for broken packages
Yessir, @FreewheelinFrank. I bookmarked the wiki on day 1. It's pretty well done, IMHO, in contrast to Fedora, which I found to be scant.
I like to post sometimes (perhaps even prematurely), even though I understand it to be counter to the "Linux Mantra" of RTFM. 8/10 I RTFM, but sometimes I like to check in on the forums.
I like to post sometimes (perhaps even prematurely), even though I understand it to be counter to the "Linux Mantra" of RTFM. 8/10 I RTFM, but sometimes I like to check in on the forums.