Thursday, April 10, 2008

Apt-get

Apt-get is Synaptic without the GUI.
If Synaptic begins to act funny, you can rely on apt-get to get the job done. In my case I had to use apt-get because synaptic would not launch. I can see the busy icon, and then nothing appears. Luckily, apt-get is a bit more logically deviced unlike many other commands in Linux.

I was completely flattered by the concise and well laid out command options. Usually typing in a command will output it's help file by default. In the few commands I have had the misfortune of having to use, this runs in to many pages. Not apt-get. The screenshot below shows the beauty of apt-get.

Since I had been trying out installing and uninstalling Wine till it somehow got motivated to sync properly so that I could use it, I was interested in removing the Wine package.
Entering apt-get got the options. Seeing that "remove" is the required option to uninstall a package, I simple entered apt-get remove wine. A few seconds of analysis later, apt-get prompted for confirmation and after the affirmative response, proceeded to remove Wine.

What striked me was the speed of processing. In synaptic invariably, even if no new packages are to be installed, it would spend a few seconds "downloading packages" then it would proceed to remove the selected packages. And usually this step if followed by a reloading of the package list which takes a few seconds more seconds. apt-get does away with both the preceeding and succeding steps and sticks to the brasstacks. It probably takes half the time as a result.
The drawback is that unlike Synaptic which automatically tracks down dependent packages and lists them too, apt-get did not do so. So a re read of the help document revealed that another parameter needed to be given for removing dependencies as well.
The correct command to remove dependencies as well was "apt-get remove wine -D".

It would be hard to understand apt-get at work without having an opportunity to see Syanptic first. The visual feedback of the package listing, the dependency calculating etc makes Synaptic many times better. But, for those seeking a quick end to a application management problem, and know exactly the package to be done away with will find apt-get more useful. It also helps when Synaptic is too gloomy to come out to play.

Since the problem I was facing was that Wine would cause X to restart without warning, which was why I was uninstalling and reinstalling the Wine package, after the latest restart, I logged into the user account, almost absent mindedly. And to my surprise Synaptic works find in that account, not Wine though.

No comments: