Posted: . At: 12:16 PM. This was 10 years ago. Post ID: 6655
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.

How to fix problems with the apt-get command when installing packages.

Sometimes when you are using the apt-get command to install updates you can get errors when installing a deb package. This is easily remedied by using the -f parameter to the apt-get install command.

Use it like this:

homer@lollinux-machina:~$ sudo apt-get -f install

This will run the installation of the packages again and fix the dependency issues. This is a very useful command to know about when you are using a Debian based Linux system.

The apt-get remove command will remove a package.

homer@lollinux-machina:~$ apt-get remove xterm

And this command will completely remove a package and the configuration files. This is good if you no longer want the package installed.

homer@lollinux-machina:~$ apt-get --purge remove xterm

if you just want to download a package and not install it then use this command. This will download the file to the current directory.

homer@lollinux-machina:~/apt$ sudo apt-get download beep
[sudo] password for homer: 
Get:1 http://au.archive.ubuntu.com/ubuntu/ trusty/universe beep amd64 1.3-3 [24.4 kB]
Fetched 24.4 kB in 0s (64.2 kB/s)

And here is the file in the current directory.

homer@lollinux-machina:~/apt$ ls
beep_1.3-3_amd64.deb

If you want to install this package, just use the dpkg -i command.

homer@lollinux-machina:~/apt$ sudo dpkg -i beep_1.3-3_amd64.deb 
Selecting previously unselected package beep.
(Reading database ... 247003 files and directories currently installed.)
Unpacking beep (from beep_1.3-3_amd64.deb) ...
Setting up beep (1.3-3) ...
Processing triggers for man-db ...

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.