Ubuntu: Cancelling/Undo apt-get commands


My friend suggested that I upgrade my ubuntu 12.04 to 13.04

I used these commands in a terminal :

sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove  

Then I think my 12.04 doesn't have a problem and is stable, and is supported until 2017.

So, how would I cancel the command.


apt-get update only updates your repos.

apt-get dist-upgrade updates your packages with smart conflict resolution, but will not update your distro to 13.04.

apt-get autoremove will remove any packages that are not needed by the system anymore, such as dependencies which are no longer required.

So in short the commands will update your system with the latest packages for your distro (Ubuntu 12.04) and clean up and remove any unnecessary packages.


If you want to cancel terminal commands... press Ctrl+C in the command prompt in which the process or processes you want to terminate are running

If the system already was in the process of installing, after the cancellation, enter the following:

sudo dpkg --configure -a  

This will make sure that started installations will finish up and you're not left with a 'broken' system.


Take a look here. dist-upgrade does not perform a distribution update. It's a nomal upgrade with "smart conflict resolution". It upgrades all packages within the distribution but does not upgrade to the next distribution. So what you did is something you do not want to cancel, you will stay with 12.04.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »