LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-29-2009, 12:40 PM   #1
flatapple
LQ Newbie
 
Registered: Aug 2009
Location: USA
Distribution: Debian 5.0.2
Posts: 9

Rep: Reputation: 0
Where do packages install to?


Hi,

When I install a package from the terminal, where does it go? I would like to be able to move packages that I install to a directory that I create. That way, I'll be more organized.

Also, is there a way to tell Linux where to install the packages?

Thanks,
flatapple
 
Old 08-29-2009, 12:53 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 19,262

Rep: Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440
Quote:
Originally Posted by flatapple View Post
Hi,

When I install a package from the terminal, where does it go? I would like to be able to move packages that I install to a directory that I create. That way, I'll be more organized.

Also, is there a way to tell Linux where to install the packages?

Thanks,
flatapple
That's like asking "how high is up?".....the packages will get installed, wherever they NEED to be installed, based on how the package is built. If the writer decided to install everything under /usr/local/bin, that's where they'll go. Others may be /usr/bin, /sbin, or wherever.

If you build things from source, rather than install from packages, you can tell it where to install. Otherwise, you're stuck with what the package wants, but I'd recommend against it. Packages often need libraries, paths, etc., to work right...if you move them, you could very easily have hard-to-fix problems.
 
Old 08-29-2009, 01:01 PM   #3
windtalker10
Member
 
Registered: Nov 2007
Location: Kentucky
Distribution: Slackware13.1
Posts: 214

Rep: Reputation: 38
Quote:
When I install a package from the terminal, where does it go?
From the terminal isn't a very good clue as it depends on where the package came from.
If the package came from a repo of the distro you're running, it went to wherever the dev had it set up to install and parts could be in several folders, in several locations and probably is.
If the package came from an outside source other than a repo from your distro, it's probably in /usr/local,,, but then again parts can and probably are in several folders in several locations throughout usr as well as newly created folders.

Quote:
I would like to be able to move packages that I install to a directory that I create. That way, I'll be more organized.
You can do that but you're kind of doing it backwards.
Create the folder first and then direct the installation to install to that folder.
I would take the time to learn how to do symlinks first however as there is the possibility you may need them.
No offense but you're recreating the wheel, which isn't necessarily a bad thing since essentially, that's how linux got started.

Quote:
Also, is there a way to tell Linux where to install the packages?
Yes.
Each installation method has it's own way of doing that.
There should be readme's as well as the man command for figuring out how.

Personal opinion here, but it might be wiser to just leave well enough alone.
The majority of what you as a user add onto your system will go in /usr,,, which is the lazy way of spelling user.
/usr is always a good place to start looking followed by /usr/local or /usr/bin.

the /bin's are short for binary and linux-speak in a way for .exe.

To learn how to move files to an "organized" folder or how to set up links requires you learn how things were supposed to be set up to begin with.
That kind of defeats the purpose to an extent of creating a special folder so everything can be found easily,,, which will probably become a mirror of what you already have or something that may resemble havoc.
A useful tip here:
Some packages don't require "installing".
Frostwire is a good case in point.
One can download the tar.gz, untar it and drop the folder anywhere in your /home folder.
You can then link to the run.sh in your start menu.
There are two of them so click on each one to see which will launch FW for you.
There is even an icon to make your start menu all purty and everything plus you can then if you so desire create a shortcut on your desktop.
There are several other apps just like this and experimenting before trying to install can save some headaches.

Last edited by windtalker10; 08-29-2009 at 01:18 PM.
 
Old 08-29-2009, 01:41 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,737

Rep: Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318
A package installed with 'apt-get install <package>
in the terminal :

The command 'dpkg -L <package>'
will display the file locations.

.....
 
Old 08-29-2009, 01:42 PM   #5
ofaring
Member
 
Registered: Feb 2006
Location: Ontario, Canada
Distribution: Debian, sometimes BSD.
Posts: 44
Blog Entries: 13

Rep: Reputation: 21
Note of caution: don't randomly delete things in /usr/bin, /usr/sbin, /bin, /sbin. Debian's package management uses those directories, and random destructive behaviour will foobar your system.

Okay, the first thing I suggest is that you get your hands dirty and read. If you want to get anywhere within the non-Windows/Mac world, you have to read...a lot. There is a lot of info available in the Linux distro world, and some of it is even accurate.

Your post leaves me some questions in return. One, when you refer to "packages", are you talking about .deb files? Two, by packages do you mean programs which you have compiled yourself? If you are refering to debian packages (.deb files), then you might carefully read this.

Debian package management

But why stop there?

Debian Reference
Debian docs to consider
TLDP

While this will likely appear intimidating at first, it is SO worth your time to familiarise yourself with both Unix in general and your OS in particular. Refusing to invest the time will cripple your experience and leave your experience anemic and frustrating. That said...

The wonder and power of Debian is its organisation. Whether you use Apt, Aptitude, or a GUI like Synaptic (and you should choose one and use it primarily, for logging reasons...have I mentioned reading yet?), you have available ~20,000 different packages (programs, etc.) all available online with dependency handling. There is seldom a need to compile programs etc. by hand, although it certainly does happen.

Of course, I haven't answered your questions. Reply to me with answers to my return questions, and I'll narrow things down if possible. (Are you compiling software by hand? Are you installing .deb files?)
 
Old 08-30-2009, 09:33 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
I think you'll this educational http://en.wikipedia.org/wiki/Filesys...archy_Standard.
In short, if you're using the pkg mgr of your distro, leave well alone.
If you're building/compiling by hand from eg a tarball, I usually create a sub-dir in /opt.
As mentioned above, those installs usually come with a readme that tells you if you can specify a destination/prefix and how to do it.
 
Old 08-30-2009, 09:35 PM   #7
flatapple
LQ Newbie
 
Registered: Aug 2009
Location: USA
Distribution: Debian 5.0.2
Posts: 9

Original Poster
Rep: Reputation: 0
Ok, thanks everyone. You answered my questions.
 
Old 08-31-2009, 03:34 AM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by flatapple View Post
Ok, thanks everyone. You answered my questions.
Reading is useful and ofaring's links give a lot of good infrmation.

To answer your first question directly, on ubuntu (Debian is probably the same) they go in /var/cache/apt/archives/. If you want to keep all the .deb files (in case you want to re-install without having to download again, except if there are newer versions) you need to copy them from there because it is only a cache and old ones are removed; the oldest ones on my system are only a month-and-a-half old.
 
Old 08-31-2009, 04:16 AM   #9
mark_alfred
Senior Member
 
Registered: Jul 2003
Location: Toronto, Ontario, Canada
Distribution: Ubuntu Linux 16.04, Debian 9
Posts: 1,317

Rep: Reputation: 153Reputation: 153
Quote:
Originally Posted by flatapple View Post
Hi,
I would like to be able to move packages that I install to a directory that I create. That way, I'll be more organized.
Synaptic already keeps track of which packages have been installed. So, if you install a package via "apt-get install package", then, when you open synaptic, simply press the Reload button, and then, across the top of the package listings, where you see
Code:
 S |  | Package | Installed Version | Latest Version | Description
hit the "S"*, and you will sort the package listings via which ones you have installed, and which ones you have not installed.

Aptitude also has a way of listing installed, and not installed packages, separately (I'm assuming you're using apt-get/synaptic, however).

_________
*or, if there's no "S" there, then hit the empty title space above the column of boxes that indicate if a package is installed or not.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to save a list of installed packages and install these packages later mandavi Ubuntu 5 09-07-2009 12:36 PM
Uncertain how to configure/install packages & compiler before install VMware on FC8. Azazwa Linux - Newbie 1 03-28-2009 08:27 PM
How to install the rest of the Linux packages from USB drive after install? ArchW Linux - General 2 03-08-2006 08:50 AM
How to install teh rest of the Linux packages from USB drive after install? ArchW Linux - Newbie 4 03-07-2006 09:43 AM
Mandrake Update/Install Packages/Remove Packages wslyhbb Mandriva 2 03-15-2004 10:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration