When I was trying to install a .deb file, dpkg gave me this error:

dpkg: error: dpkg status database is locked by another process

So I tried the dpkg --configre -a and it gave me this output

Setting up linux-image-4.10.0-24-generic (4.10.0-24.28) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.10.0-24-generic
) points to /boot/vmlinuz-4.10.0-24-generic
 (/boot/vmlinuz-4.10.0-24-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.10.0-24-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.10.0-24-generic /boot/vmlinuz-4.10.0-24-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.10.0-24-generic /boot/vmlinuz-4.10.0-24-generic

it stopped in last line for 1h and then I had to use Ctrl+c to exit.

Whats wrong with my system?

P. S. : Once I had a trouble installing wicd and since then apt is giving me all kind of errors. if this is related to that, is there anyway to say apt to do checks to find the problem(s)? or I have to reinstall the ubuntu?


1 Answer 1


One possible reason for your problem is a full /boot partition. On some Ubuntu installation you will find the following partition layout:

/dev/sda2 on / type ext4 (rw)
/dev/sda1 on /boot type ext2 (rw)
df -h
Filesystem      Size  Used Avail  Use% Mounted on
/dev/sda2       200G   23G  172G   12% /
/dev/sda1       1G      1G    0G  100% /boot

In most cases the /boot partitions gets crowded with kernel updates. Removing old kernels can be done with:

sudo apt-get --purge autoremove

If however /boot is over crowded, you need to manually remove some of the old kernel packages:

dpkg -l "*linux*" | grep ^ii | tr -s ' ' | cut -d' ' -f2
sudo dpkg -r linux-image-4.4.0-79-generic \

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .