logo

Home page
Articles for Windows, Linux, OS X
Mac tips and articles
Mac tips
Windows 8 tips and articles
Windows 7 tips and articles
Vista Tips
XP Tips
Linux tips and articles
Read the blog
Online store
Windows, Linux, OS X programs
Links
About

Linux tips and tweaks

Update the system using apt-get or Update Manager

Keeping the operating system up to date is important for several reasons no matter whether you use Linux, Windows or Apple Mac OS X. Updates to the system will fix bugs, stop crashes and other problems and may also add new features too. Keeping the OS up to date is quite easy and in this article we take a look at Linux, specifically Ubuntu and similar distros that are based on Debian. There are two ways to update the system and you can either use the graphical user interface of Update Manager, which is accessed from the menu bar, or you can open a Terminal window and use apt-get. Command line die-hards will prefer that option, but both work just as well.

If you absolutely must type in complex and hard to remember commands for everything, then open a Terminal window and enter apt-get update. This actually needs administrator status, so in Ubuntu you would type sudo apt-get update. Apt stands for Advanced Package Tool and apt-get is a command that can accept several different parameters. The update parameter instructs the system to download the latest index of packages, which basically means get the latest version number of everything that's available online.

Once you've updated the index, you can enter sudo apt-get upgrade. This checks the version of all the system files with the index and if there are any newer versions then it downloads and installs them. There's an interesting variation of the command and sudo apt-get -s update goes through the process, but doesn't actually download and install anything. It basically tests to see if there are any newer versions of files and lists them. The -s means simulate.

Sometimes not all possible updates are downloaded and installed, and there is a more powerful version of the command, sudo apt-get dist-upgrade. The difference is that if there are new versions of packages with different dependencies, in other words, other support files are required, then it will download everything that is required. Outdated packages can be removed too. This command could be used to upgrade the distro to a new version, but it doesn't have to and most of the time it will work just like sudo apt-get upgrade.

Downloaded packages may be left on the disk and they aren't always needed and just end up using up disk space for no good reason. You can remove them and reclaim the disk space with this command, sudo apt-get clean. Instead of removing everything, you can use the following command, sudo apt-get autoclean, to keep recent versions, but delete packages that are useless. That's probably a better idea.

Update ManagerIf you're not into all this command line nonensense and you prefer something you can point the mouse at and click on, go to the System, Administration menu in Ubuntu and select Update Manager. You can think of this as a graphical front end to apt-get.

You should always click the Check button first to refresh the index (like apt-get update) and then you'll see a list of the updates in the window (apt-get -s update).

Unlike apt-get, you can choose the updates you want to download install using the tick boxes next to each one.

OK, you can do this from the command line with apt-get, but it's just too fiddly to bother with.

After selecting the updates, you can then click Install Updates to download and install the packages (apt-get update).



Go to Linux tips index...

copyright