4

I invoked an apt install (of mysql-workbench) by double clicking the downloaded .deb file.

It hangs at the "preparing" stage and the "Cancel" button does nothing.

ps aux | grep apt

didn't find any process running.

What process name should I look for? How do I kill it?

3 Answers 3

6

Let’s understand this in a better way.

  • apt, often called Advance Packaging tool, downloads the .deb file of the package for you.

  • dpkg, often called Debian Package Maintainer, compiles/install the package's .deb file for you. From IBM's documentation for dpkg (emphasis my own):

    dpkg is the software that forms the low-level base of the Debian package management system. It is the default package manager on Ubuntu. You can use dpkg to install, configure, upgrade or remove Debian packages, and retrieve information of these Debian packages.

In this specific case, you mentioned that the .deb file is already downloaded. So, when you'll double click the file, or will open it with Software Center. The Software Center will use dpkg to process and install the package. So, you need to search for dpkg instead of apt using ps aux:

ps aux | grep dpkg 

Then you can kill it using:

sudo kill -9 <process id> 

You can also get the process's ID using:

sudo lsof /var/lib/dpkg/lock-frontend

And kill it using:

sudo kill -9 <process id>

Note: Killing a process will interrupt dpkg. You cannot use dpkg again without configuring it. Run:

sudo dpkg --configure -a
3

Double-clicking a .deb file opens it for installation in the Software app. The Software app is named gnome-software in Ubuntu. You can force close the Software app by finding gnome-software in the System Monitor app, right-clicking it, then stop/end it, or from the terminal by running pkill gnome-software.

If double-clicking the .deb file the first time generated an error message, I recommend trying to install it from the terminal with sudo apt install ./FILE.deb the next time in order to get verbose output from the software installation command that will help to troubleshoot the problem with installing FILE.deb. For example if there are unmet dependencies the results of sudo apt install ./FILE.deb will list them.

7
  • I have a doubt, will killing gnome-software, also kill apt and dpkg? I am unsure about that. O_o
    – Someone
    Jan 18 at 14:18
  • @Someone Killing gnome-software won't kill either apt or dpkg. It will just unlock the currently running installation process from gnome-software if there is a currently running installation process in gnome-software that is locking either apt or dpkg.
    – karel
    Jan 18 at 14:22
  • If double-clicking the .deb file the first time generated an error message, I recommend trying to install it from the terminal with sudo apt install ./FILE.deb the next time in order to get verbose output from the software installation command that will help to troubleshoot the problem with installing FILE.deb. For example if there are unmet dependencies the results of sudo apt install ./FILE.deb will list them.
    – karel
    Jan 18 at 14:28
  • Thanks @karel, I did what you suggested, i.e., sudo apt install ./FILE and the workbench installed all right. No hanging!
    – MeirG
    Jan 18 at 18:06
  • 1
    @Someone A command of the form sudo apt install ./FILE.deb will either automatically install all of the required dependencies, or if the command fails it will print a detailed error message that lists the unmet dependencies. You can also use this type of command to simulate a package installation without installing anything apt install --simulate ./FILE.deb Note that since a simulated command doesn't install anything sudo is not required,
    – karel
    Jan 19 at 6:28
2

First try if hitting the close button does not cause the system to ask you to kill this unresponsive window.

Then try killing the process, i.e. Ubuntu Snap Store, using System Monitor.

If you are on Xorg, then the command xkill will change your cursor in a diagonal cross. Click the unresponsive window to kill its process.

2
  • Dear @vanadium, I am a rather newbie at Linux and Ubuntu, how do I invoke the system monitor? The close button just closed the window and IMHO didn't kill the process. I think so because double clicking again on the *.deb file opened a window with a revolving circle that hangs also...
    – MeirG
    Jan 18 at 12:26
  • 1
    Via the application menu. You said in your question that the cancel button does nothing. I was therefore assuming that the window is not responsive.
    – vanadium
    Jan 18 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.