Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I was deleting wine package and somehow apt-get was deleted along wine. Now if I try to use apt-get I see message that apt-get isn't installed/exists.

I already install aptitude, but when I use it I have error says that I haven't driver for /usr/lib/apt/methods/https

so here's the question: how can I install apt-get back?

share|improve this question
1  
did you try another package manager like synaptic package manager or ubuntu software center to install the apt package? –  Nil Aug 29 '13 at 0:50
    
nope. it's graphical. i need manager for terminal. –  Alexander Aug 29 '13 at 1:01
    
Sorry, you're correct, Synaptic is the front end for apt, it depends on apt. The same is true for Software Center. –  Nil Aug 29 '13 at 1:09
    
problem solved. i've collected apt-get from pieces. thx to all who have answered. –  Alexander Aug 29 '13 at 1:12
add comment

2 Answers 2

apt-get is a kind of "frontend" for dpkg which is in an ultimate instance, who do all operations. You can easily recover your apt-get if you download the package from the repository and install it yourself:

(this is a illustrative example, I'm using the latest version of apt i386 from precise-updates repository, you should download the one that fits you, for a complete list of versions check: Ubuntu apt package list or Launchpad apt package list. You should check your installed version using apt-cache policy apt)

wget http://mirrors.us.kernel.org/ubuntu/pool/main/a/apt/apt_0.8.16~exp12ubuntu10.12_i386.deb http://mirrors.us.kernel.org/ubuntu/pool/main/a/apt/apt-transport-https_0.8.16%7Eexp12ubuntu10.12_i386.deb
sudo dpkg --unpack apt_0.8.16~exp12ubuntu10.12_i386.deb apt-transport-https_0.8.16%7Eexp12ubuntu10.12_i386.deb
sudo dpkg --configure -a
sudo apt-get update

Now you have your apt-get working again.

Why not use --install instead of separated --unpack and --configure?

The --install switch executes tasks that are not necessary (prerm, preinst, postrm) for recovering apt binaries, and might run into problems later due the sorry state of the installation. For such reason, --unpack to get the binaries set in place and --configure to restore any lost configuration file are just necessary.

share|improve this answer
add comment

Try the software center which is installed by default. Look for the package 'apt'.

share|improve this answer
3  
If he's deleted apt, software center won't work. –  Thomas W. Aug 29 '13 at 0:58
    
thx for answer, but there no software center. it's also deleted with apt-get –  Alexander Aug 29 '13 at 0:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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