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 downloading a package using the terminal. I actually wanted to install package 'A'. But, by mistake started installing package 'B'. I wanted to stop downloading 'B' and start downloading 'A'.


I couldn't able to do that. I reset my network connection. I could stop downloading the package B. But, the administrator directory was locked and wasn't able to download other packages which made me to restart my system.

What command should I use to abort the active download of packages in ubuntu?

share|improve this question
    
Just to confirm, this is when using apt-get? –  8128 Oct 24 '10 at 8:11
    
Ya, when using apt-get –  Vinay Challuru Oct 25 '10 at 8:33

2 Answers 2

up vote 9 down vote accepted

have you tried pressing Ctrl+C?

share|improve this answer
7  
Only press Ctrl+C when you are downloading. Once it starts installing, it is better to let it finish installing and then uninstall it because cancelling while it is installing can cause broken packages. –  dv3500ea Oct 24 '10 at 10:31
    
Thanks. I will mind it. –  Vinay Challuru Oct 25 '10 at 8:34

If you press Ctrl + c while packages are downloading, thats fine. Just dont interrupt an install. ALso, remember to use

sudo apt-get autoclean

after you interrupted the package download, so that the downloaded packages dont take up disk space.

share|improve this answer

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.