7

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 wasn'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?

Vinay
  • 3,611
  • 6
  • 21
  • 22

2 Answers2

9

have you tried pressing Ctrl+C?

dv3500ea
  • 36,816
  • 13
  • 99
  • 152
Praweł
  • 6,428
  • 5
  • 35
  • 51
  • 8
    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
4

If you press Ctrl + c while packages are downloading, that's fine. Just don't interrupt an install. Also, remember to use

sudo apt-get autoclean

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

muru
  • 193,181
  • 53
  • 473
  • 722
theTuxRacer
  • 15,945
  • 22
  • 71
  • 91