You are not logged in.

#1 2013-05-03 02:54:54

vinicius
Member
Registered: 2009-02-07
Posts: 37

Package installation directory

Hi there

I have my Arch working in a 8.2GB partition for a while and I've been surviving with extreme lightweight programs, cleaning cache and this kind of stuff. But now I'm running out of space (329MB free) and I need to install a couple of new programs (e.g. Blender with 468.48MB). I do have another disk, which is used for data storage and has a loot of available room.

Is there a way to change the install destination directory of a package?
For example, in Windows most of times we can use advanced options in wizards to select the installation folder.
Is it possible to reproduce that in Arch? I mean, to install Blender in the second disk instead of in the root one?

I appreciate any suggestion.

Thank you!

Last edited by vinicius (2013-05-03 02:55:31)

Offline

#2 2013-05-03 03:54:07

dodo3773
Member
Registered: 2011-03-17
Posts: 801

Re: Package installation directory

Did you try cleaning out your pacman cache (/var/cache/pacman/pkg/)? Also, run a tool like ncdu will tell you which directories take up a lot of space. If /var is one of them you may want to see if cleaning up your old journald log files helps (I did it recently and freed up a lot of space).

Offline

#3 2013-05-03 07:52:19

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: Package installation directory

Not easily. There is no "install directory" on linux. Files from a package are distributed across the file system depending on their purpose/type. If you want, you can move the data directory (/usr/share/<dir>) to your data partition and bind-mount  the directory on your data partition to /usr/share/<dir>. You could also try some form of filesystem merging (unionfs, aufs) but will probably be painful.


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#4 2013-05-03 13:00:59

vinicius
Member
Registered: 2009-02-07
Posts: 37

Re: Package installation directory

dodo3773 wrote:

Did you try cleaning out your pacman cache (/var/cache/pacman/pkg/)?

Thanks, dodo3773.
I frequently run pacman -Scc to address that. I know it has some cons but that's life.

dodo3773 wrote:

Also, run a tool like ncdu will tell you which directories take up a lot of space.

I like to use the following command to check that out:

find . -type f -size +10M -exec ls -lh {} \; | awk '{ print $5 ": " $9 }'
dodo3773 wrote:

If /var is one of them you may want to see if cleaning up your old journald log files helps (I did it recently and freed up a lot of space).

Do you know exactly where the journal logs are stored? I'm asking because I think I'm already handling it with a couple of fstab entries:

tmpfs    /tmp        tmpfs    defaults,noatime,mode=755    0 0
tmpfs    /var/tmp    tmpfs    defaults,noatime,mode=755    0 0
tmpfs    /var/log    tmpfs    defaults,noatime,mode=755    0 0
Stebalien wrote:

Not easily. There is no "install directory" on linux. Files from a package are distributed across the file system depending on their purpose/type. If you want, you can move the data directory (/usr/share/<dir>) to your data partition and bind-mount  the directory on your data partition to /usr/share/<dir>.

Thanks for the suggestion, Stebalien.
I was thinking in something close to this idea but only for some specific packages. The reason is because the small partition is in a SSD so it is nice to not move too much things from there in order to keep be benefit of high speed access.

Is there a way to at least track what files and folders where created by installing a package?
Or, even better, preview that changes before actually install?

Last edited by vinicius (2013-05-03 13:02:18)

Offline

#5 2013-05-03 14:25:59

Raynman
Member
Registered: 2011-10-22
Posts: 1,437

Re: Package installation directory

vinicius wrote:

Is there a way to at least track what files and folders where created by installing a package?
Or, even better, preview that changes before actually install?

You can list files of installed packages using `pacman -Ql`. For packages in the repos, a list of files is available on the web, and for any package, you can simply use

tar -tf <package>.pkg.tar.xz

to list the contents.

Offline

#6 2013-05-03 17:01:44

dodo3773
Member
Registered: 2011-03-17
Posts: 801

Re: Package installation directory

Do you know exactly where the journal logs are stored? I'm asking because I think I'm already handling it with a couple of fstab entries:

   
/var/log/journal/


Is there a way to at least track what files and folders where created by installing a package?
Or, even better, preview that changes before actually install?

pacman -Ql packagename

Offline

#7 2013-05-03 19:30:03

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: Package installation directory

You can resize your root partition at the expense of another. This will solve your problem once and for all.

Offline

#8 2013-05-03 19:30:35

vinicius
Member
Registered: 2009-02-07
Posts: 37

Re: Package installation directory

pacman -Ql packagename

Nice hint. It doesn't actually solve the problem but it's useful (with some mv and ln -s).
Thank you guys.

Offline

#9 2013-05-04 02:29:32

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 6,145

Re: Package installation directory

/var/tmp should not be on tmpfs, should it? Aren't the files there supposed to persist across boots?


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Corporation Wireless 8265 / 8275 | US keyboard with Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#10 2013-05-04 23:24:53

vinicius
Member
Registered: 2009-02-07
Posts: 37

Re: Package installation directory

cfr wrote:

/var/tmp should not be on tmpfs, should it? Aren't the files there supposed to persist across boots?

I really don't know if there is a problem by doing that. Everything is working fine here until now.

Offline

#11 2013-05-05 00:39:46

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Package installation directory

/var/log shouldn't be on tmpfs either. If you want the journal to write to volatile storage, then just configure it in /etc/systemd/journald.conf.

Offline

#12 2013-05-06 15:15:36

vinicius
Member
Registered: 2009-02-07
Posts: 37

Re: Package installation directory

falconindy wrote:

/var/log shouldn't be on tmpfs either. If you want the journal to write to volatile storage, then just configure it in /etc/systemd/journald.conf.

All right. I'll check that out.
But what kind of data in /var/log and /var/tmp should persist between boots?


Edit:
Now I understand the differences between /tmp and /var/tmp (link1, link2, link3).
But still didn't get what is the matter with /var/log.

Last edited by vinicius (2013-05-06 16:22:30)

Offline

#13 2013-05-06 23:23:17

Scimmia
Fellow
Registered: 2012-09-01
Posts: 9,321

Re: Package installation directory

you don't see it as a problem that all of your log files a gone after a reboot?

Online

#14 2013-05-07 00:36:39

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 1,022

Re: Package installation directory

I sugest this:

format yoy 'new hardisk' and move home to that and edit it to mount /home from the new disk
remmember empty home previous to (re)mount home from the /etc/fstab to prevent problems

this can clean space... and all possible partitions (/boot for examble) move to another disk and mount them from fstab (remmember this to for swap)


Well, I suppose that this is somekind of signature, no?

Offline

#15 2018-07-24 23:30:21

jordicg
Member
From: Mexico City
Registered: 2018-07-19
Posts: 94
Website

Re: Package installation directory

Hey your solution is easy to me.-

1.- Download the source of Blender, uncompress it where you want and then simply create a link to the main Blender app where you want
2.- Next time you install Arch Linux make the swap partition bigger, it will save you a lot of headache

But i think the first one is the best for you, good luck !!!


With great power there must also come -- great responsibility!

Offline

#16 2018-07-24 23:38:54

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,208
Website

Re: Package installation directory

jordicg, please leave the dead to rest in peace: https://wiki.archlinux.org/index.php/Co … bumping.22

Closing.

Offline

Board footer

Powered by FluxBB