[Solved] A process (script?) to check for broken packages

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
malonn
Posts: 3
Joined: 2024-12-10 09:50
Has thanked: 1 time

[Solved] A process (script?) to check for broken packages

#1 Post by malonn »

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?
Last edited by malonn on 2024-12-14 11:28, edited 1 time in total.

User avatar
FreewheelinFrank
Global Moderator
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

#2 Post by FreewheelinFrank »

Code: Select all

# apt-get check
from

Code: Select all

# man apt-get
check
check is a diagnostic tool; it updates the package cache and checks
for broken dependencies.

User avatar
malonn
Posts: 3
Joined: 2024-12-10 09:50
Has thanked: 1 time

Re: A process (script?) to check for broken packages

#3 Post by malonn »

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.

User avatar
FreewheelinFrank
Global Moderator
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

#4 Post by FreewheelinFrank »

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

User avatar
malonn
Posts: 3
Joined: 2024-12-10 09:50
Has thanked: 1 time

Re: A process (script?) to check for broken packages

#5 Post by malonn »

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.

eamanu
Debian Developer
Debian Developer
Posts: 8
Joined: 2020-07-12 21:37
Has thanked: 2 times
Contact:

Re: [Solved] A process (script?) to check for broken packages

#6 Post by eamanu »

@Best_Threads

Post Reply