Thanks, sudo apt-get autoremove && sudo apt-get autoclean worked but when I try to install network-manager it crashes again.
sudo apt-get install network-manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
crda dnsmasq-base iw libjim0debian2 libnetfilter-conntrack3 libnl-route-3-200 libnm-glib4 libnm-util2
libpcap0.8 modemmanager ppp usb-modeswitch usb-modeswitch-data wireless-regdb
Suggested packages:
avahi-autoipd comgt wvdial
The following NEW packages will be installed:
crda dnsmasq-base iw libjim0debian2 libnetfilter-conntrack3 libnl-route-3-200 libnm-glib4 libnm-util2
libpcap0.8 modemmanager network-manager ppp usb-modeswitch usb-modeswitch-data wireless-regdb
0 upgraded, 15 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,954 kB of archives.
After this operation, 9,015 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1
http://mirrordirector.raspbian.org/raspbian/ wheezy/main libnl-route-3-200 armhf 3.2.7-4 [103 kB]
0% [1 libnl-route-3-200 0 B/103 kB 0%] [Waiting for headers]
What am I doing wrong