Debian GNU/Linux: Guide to Installation and Usage by John Goerzen and Ossama Othman is part of the HackerNoon Books Series. You can jump to any chapter in this book here. Removing and Installing Software
This chapter describes ways of installing and removing software packages. There are several ways of doing both. Here we discuss installation and removal of pre-built software, such as Debian packages, and installation of source that must be built by you.
An application or utility program usually involves quite a few files. It might include libraries, data files like game scenarios or icons, configuration files, manual pages, and documentation. When you install the program, you want to make sure you have all the files you need in the right places.
You’d also like to be able to uninstall the program. When you uninstall, you want to be sure all the associated files are deleted. However, if a program you still have on the system needs those files, you want to be sure you keep them.
Finally, you’d like to be able to upgrade a program. When you upgrade, you want to delete obsolete files and add new ones, without breaking any part of the system.
The Debian package system solves these problems. It allows you to install, remove, and upgrade software packages, which are neat little bundles containing the program files and information that helps the computer manage them properly. Debian packages have filenames ending in the extension .deb, and they’re available on the FTP site or on your official Debian CD-ROM.
The simplest way to install a single package you’ve downloaded is with the command dpkg -i (short for dpkg -install). Say you’ve downloaded the package icewm_0.8.12-1.deb and you’d like to install it. First log on as root, and then type dpkg -i icewm_0.8.12-1.deb, and icewm version 0.8.12 will be installed. If you already had an older version, dpkg will upgrade it rather than installing both versions at once.
If you want to remove a package, you have two options. The first is most intuitive: dpkg -r icewm. This will remove the icewm package (-r is short for -remove). Note that you give only the icewm for -remove, whereas -install requires the entire .deb filename.
-remove will leave configuration files for the package on your system. A configuration file is defined as any file you might have edited in order to customize the program for your system or your preferences. This way, if you later reinstall the package, you won’t have to set everything up a second time.
However, you might want to erase the configuration files too, so dpkg also provides a -purge option. dpkg -purge icewm will permanently delete every last file associated with the icewm package.
dselect is a great front-end for dpkg. dselect provides a menu interface for dpkg, and can automatically fetch the appropriate files from a CD-ROM or Internet FTP site. For details on using dselect, see section 3.20 on page [*].
Many programs come in source format, often in tar.gz form. First, you must unpack the tar.gz file; for details on doing this, see section 10.3.1 on page [*]. Before you can compile the package, you’ll need to have gcc, libc6-dev, and other relevant “-dev” packages installed; most of these are listed in the devel area in dselect.
With the appropriate packages installed, cd into the directory that tar created for you. At this point, you’ll need to read the installation instructions. Most programs provide an INSTALL or README file that will tell you how to proceed.
About HackerNoon Book Series: We bring you the most important technical, scientific, and insightful public domain books.
This book is part of the public domain. John Goerzen and Ossama Othman (2004). Debian GNU/Linux : Guide to Installation and Usage. Urbana, Illinois: Project Gutenberg. Retrieved https://www.gutenberg.org/cache/epub/6527/pg6527-images.html
This eBook is for the use of anyone anywhere at no cost and with almost no restrictions whatsoever. You may copy it, give it away or re-use it under the terms of the Project Gutenberg License included with this eBook or online at www.gutenberg.org, located at https://www.gutenberg.org/policy/license.html.