Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to install openvpn using apt-get, but I get an error during the process [As far as I understand the issue is with unattended-updates, which I could not upgrade due to apt-get porblem :/]. I cannot upgrade, install, autoremove or purge anything else [which I need to do since /boot is full. For upgrading I did update before trying]....

Trace [on sudo apt-get autoremove]:

0 upgraded, 0 newly installed, 79 to remove and 421 not upgraded.
35 not fully installed or removed.
Need to get 24.1 kB of archives.
After this operation, 140 MB disk space will be freed.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ oneiric/main unattended-upgrades all 0.73ubuntu1 [24.1 kB]
Fetched 24.1 kB in 0s (31.2 kB/s)
Preconfiguring packages ...
(Reading database ... 287206 files and directories currently installed.)
Removing flashplugin-downloader:i386 ...
Removing libasound2-plugins:i386 ...
Removing libpulse0:i386 ...
Removing libsndfile1:i386 ...
Removing libvorbisenc2:i386 ...
Removing libvorbis0a:i386 ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
(Reading database ... 287174 files and directories currently installed.)
Preparing to replace unattended-upgrades 0.73ubuntu1 (using .../unattended-upgrades_0.73ubuntu1_all.deb) ...
Checking for running unattended-upgrades:
Traceback (most recent call last):
File "/usr/share/unattended-upgrades/unattended-upgrade-shutdown", line 27, in <module>
import apt_pkg
ImportError: No module named apt_pkg
invoke-rc.d: initscript unattended-upgrades, action "stop" failed.
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
Checking for running unattended-upgrades:
Traceback (most recent call last):
File "/usr/share/unattended-upgrades/unattended-upgrade-shutdown", line 27, in <module>
import apt_pkg
ImportError: No module named apt_pkg
invoke-rc.d: initscript unattended-upgrades, action "stop" failed.
dpkg: error processing /var/cache/apt/archives/unattended-upgrades_0.73ubuntu1_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
update-rc.d: warning: unattended-upgrades start runlevel arguments (2 3 4 5) do not match LSB Default-Start values (none)
update-rc.d: warning: unattended-upgrades stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (0 6)
Checking for running unattended-upgrades:
Traceback (most recent call last):
File "/usr/share/unattended-upgrades/unattended-upgrade-shutdown", line 27, in <module>
import apt_pkg
ImportError: No module named apt_pkg
invoke-rc.d: initscript unattended-upgrades, action "start" failed.
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/unattended-upgrades_0.73ubuntu1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Maybe I missed something basic, but I would appreciate pointers on solving the issue. Thanks

share|improve this question

closed as too localized by Jorge Castro, Ringtail, Stephen Myall, Eric Carvalho, Mik Jan 11 at 21:40

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

2 Answers

have you tried this.

sudo dpkg --configure -a
share|improve this answer
I get an error on that too... gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.0.0-12-generic with 1. dpkg: error processing initramfs-tools (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: linux-image-3.0.0-15-generic unattended-upgrades python-software-properties software-properties-gtk initramfs-tools – Ark Mar 8 '12 at 19:27
No space left on device how much space do you have left in / and /boot ? – Uri Herrera Mar 8 '12 at 19:29
no space at all... [df /boot gives 100% used]. I was trying to remove the previous kernel images, but purge returns an error. – Ark Mar 8 '12 at 19:32
On / 5% is used. – Ark Mar 8 '12 at 19:33
run baobab and search for the file/folder that is taking up space – blade19899 Mar 8 '12 at 19:34

Open your terminal and run these commands:

sudo apt-get autoremove
sudo apt-get autoclean

sudo apt-get update
sudo apt-get upgrade
share|improve this answer
Since autoclean removes packages that are no longer available from configured software sources, you may want to move the sudo apt-get autoclean step until right after the sudo apt-get update step. – Eliah Kagan Oct 3 '12 at 12:36

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