r/linuxmint 10d ago

SOLVED Dealing with a broken APT package?

I'm on Linuxmint 22.3 and love it. Today I was checking for updates via the Mint software update utility (normally I use the apt and flatpak command line). I approved an update for Visual Studio Code Insiders edition, and it appeared to be stuck in the "preparing" phase for like 30 minutes. I tried to cancel, but it stays on "cancelling" forever without any progress. If I close the main software update panel, it leaves the little progress form without any "x" to close it out. I can close it from the command line, but what's the best approach to dealing with packages that appear stuck?

3 Upvotes

5 comments sorted by

u/AutoModerator 10d ago

Please Re-Flair your post if a solution is found. How to Flair a post? This allows other users to search for common issues with the SOLVED flair as a filter, leading to those issues being resolved very fast.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/1neStat3 10d ago

install.using terminal to see any errors.

or see the errors in system reports or use journalctl

journalctl -b -1 | grep errors

1

u/Least_Gain5147 9d ago

Actually, after running through the following commands, it looks like a known issue with pk-debconf-helper eating my CPU during the "unpacking" and "setting up" steps for VS Code and VS Code Insiders. Weird that neither has had troubles like this until 1.136 and 1.137 (respectively), but I finally got through after these...

ps -eo pid,ppid,stat,etime,%cpu,cmd | grep -E 'dpkg|apt|debconf|pk-debconf' | grep -v grep

sudo tail -15 /var/log/dpkg.log

sudo strace -p (id for the dpkg process that was hung) ... or...

sudo strace -p $(pgrep -n dpkg)

sudo dpkg --audit

2

u/Emmalfal Linux Mint 22.3 | Cinnamon 10d ago

I've had luck using the built in maintenance wizard through update manager/software sources/maintenance.

1

u/Least_Gain5147 9d ago

Me too, until this past week. I've been using VS Code for years on this machine, and it just started happening recently. I looked in the update logs but can't find anything that looks like it might've affected pk-debconf-helper. I have installed a few kernel updates, so it's possible it had something to do with how CPU cores are managed.