Installing new apps in Ubuntu, a few questions.

Threepwood

Senior Member
Joined
Aug 27, 2007
Messages
806
Reaction score
0
I know more or less that when I want to install a new app I type something like "sudo apt-get install appnamehere" correct?

What I want to know is where on my hdd do those apps get downloaded to, and will they be kept or deleted automatically (how can I stop them from being deleted if they are), I don't want to have to download all my stuff again and again every time I bugger up the OS. Is there some easy way I can set it to download the apps to a dir of my choice?

Also there's the question of using local repositories, I think I saw a thread which explained how to do it but can't find it now. Any thread to do with that will help.

I noticed in the Xubuntu package manager there is an option to do with repository servers which looks localised, I haven't yet tried it though on a local only account. (Will try figure out making a PPPoE connection for my account later.) Should it just be able to downlaod on local only already?
 
I know more or less that when I want to install a new app I type something like "sudo apt-get install appnamehere" correct?

What I want to know is where on my hdd do those apps get downloaded to, and will they be kept or deleted automatically (how can I stop them from being deleted if they are), I don't want to have to download all my stuff again and again every time I bugger up the OS. Is there some easy way I can set it to download the apps to a dir of my choice?

Also there's the question of using local repositories, I think I saw a thread which explained how to do it but can't find it now. Any thread to do with that will help.

I noticed in the Xubuntu package manager there is an option to do with repository servers which looks localised, I haven't yet tried it though on a local only account. (Will try figure out making a PPPoE connection for my account later.) Should it just be able to downlaod on local only already?

Technically,
Code:
sudo aptitude install <abc>
installs packages. Sometimes it's not necessarily an application you want to install. Applies for things like codecs, libraries, fonts, etc too.

When you follow this method, the packages get downloaded to /var/cache/apt/archives/

One way to keep those packages is to copy them over and back them up. But that can get out of hand VERY quickly.

A better option is to install and use apt-cacher:
Code:
sudo aptitude install apt-cacher

This will set your computer up as a "repository". Don't worry, you can restrict who can and can't make use of this repository. Then apt-cacher will cache your files that you need (you run a script to do this automagically).

With regards to local repositories, first backup your sources.list:
Code:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
then edit your sources.list:
Code:
sudo gedit /etc/apt/sources.list
All you really need in there are a few lines for each of the repositories that you wish to use. Mine looks like the following:
Code:
deb http://ubuntu.mirror.ac.za/ubuntu-archive/ hardy main restricted universe multiverse
deb-src http://ubuntu.mirror.ac.za/ubuntu-archive/ hardy main restricted universe multiverse
deb http://ubuntu.mirror.ac.za/ubuntu-archive/ hardy-updates main restricted
deb-src http://ubuntu.mirror.ac.za/ubuntu-archive/ hardy-updates main restricted
deb http://ubuntu.mirror.ac.za/ubuntu-archive/ hardy-security main universe multiverse restricted
deb-src http://ubuntu.mirror.ac.za/ubuntu-archive/ hardy-security main universe multiverse restricted

Obviously, you needn't have all the same options as me; i.e. you needn't have "universe" and "multiverse" etc. For a good description of the package classifications, see the Wikipedia article.

As far as I know, during installation when you choose your location, it sets up your repositories accordingly. For me, I simply had to add universe and multiverse in order to use those packages.
 
Last edited:
go to add-remove packages
you can choose to download packages only for installation later
 
If you want the deb files of all the updates/programs you have downloaded using using apt you can go to:

/var/cache/apt/archives
 
If you want the deb files of all the updates/programs you have downloaded using using apt you can go to:

/var/cache/apt/archives

Oops!!! You're absolutely correct... Got confused :p
 
Oops!!! You're absolutely correct... Got confused :p

No problem man.

They won't be deleted automatically unless you run something like:
sudo apt-get autoclean/purge/clean etc.
 
Heh, well as far as local goes, I'm actually using Xubuntu right now, was very straightforward to set up my NIC (didn't work well in the previous release, this time I didn't do anything at all it just worked with 8.10).

Easily set it up on my lan, and set up a pppoe for my local axxess account, stuff just downloads over my local account without having to do anything.
 
Top
Sign up to the MyBroadband newsletter
X