Apt-get

From Wsms

Jump to: navigation, search

apt-get

Contents

common usage

Install emacs:

root@mckinley:~# apt-get -y install emacs
...

Remove unwanted packages:

root@linuxmint-4:~# apt-get autoremove mintupdate
...

Upgrade to a new version of your distro. Be careful, I've tried it several times without success.

root@linuxmint-4:~# apt-get dist-upgrade
...

tips

If you see something like:

W: GPG error: http://ftp.de.debian.org unstable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A70DAF536070D3A1

You need to import the public key.See http://wiki.debian.org/SecureApt

Sometimes you can download the key and do:

# apt-key add key

See http://news.softpedia.com/news/How-To-Install-OpenOffice-org-3-0-in-Ubuntu-8-10-96449.shtml for an example of this.

apt-get build-dep lirc

If you need to get the build dependencies for a package, use the build-dep option, for example:

ggeller@ggeller-desktop:~/mythbuntu/lirc-0.8.6$ sudo apt-get build-dep lirc

dpkg -i <package> and apt-get -f

Sometimes you are provided with at .deb package and you want to pull the dependencies in from your apt repository. This is the nearest equivalent to yum install local <rpm-file>

root@ggeller-desktop:/home/ggeller# dpkg -i virtualbox-3.2_3.2.6-63112~Ubuntu~karmic_amd64.deb 
...
Errors were encountered while processing:
 virtualbox-3.2
root@ggeller-desktop:/home/ggeller# apt-get -f install
...

see also

man apt-get
yum
dpkg
Personal tools