Apt: install packages to a different location
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
Problem:
I have a Lubuntu persistent USB install. I started using it due to problems with my hard drive (Samsung 850 Evo) which used to have Ubuntu installed. My computer (MacBook Pro 9,2) had OSX but after a filesystem corruption I installed Ubuntu. Ubuntu became unbootable shortly after (literally a couple reboots). I formated the disk and decided to start using the live USB with persistence enabled.
Question:
I can't install more packages because I have almost no space left on my 4GB USB. I can perfectly mount the hard drive and store files there, read/write, etc. Is there a way to install the packages into the hard drive and turn /usr to a symlink to /mnt/mydrive ?
I don't care if it's a bad practice or something like that. I would like to know if it's feasible and if so, some instructions and/or recommendations on how to achieve it.
apt live-usb lubuntu
New contributor
add a comment |
up vote
1
down vote
favorite
Problem:
I have a Lubuntu persistent USB install. I started using it due to problems with my hard drive (Samsung 850 Evo) which used to have Ubuntu installed. My computer (MacBook Pro 9,2) had OSX but after a filesystem corruption I installed Ubuntu. Ubuntu became unbootable shortly after (literally a couple reboots). I formated the disk and decided to start using the live USB with persistence enabled.
Question:
I can't install more packages because I have almost no space left on my 4GB USB. I can perfectly mount the hard drive and store files there, read/write, etc. Is there a way to install the packages into the hard drive and turn /usr to a symlink to /mnt/mydrive ?
I don't care if it's a bad practice or something like that. I would like to know if it's feasible and if so, some instructions and/or recommendations on how to achieve it.
apt live-usb lubuntu
New contributor
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
Problem:
I have a Lubuntu persistent USB install. I started using it due to problems with my hard drive (Samsung 850 Evo) which used to have Ubuntu installed. My computer (MacBook Pro 9,2) had OSX but after a filesystem corruption I installed Ubuntu. Ubuntu became unbootable shortly after (literally a couple reboots). I formated the disk and decided to start using the live USB with persistence enabled.
Question:
I can't install more packages because I have almost no space left on my 4GB USB. I can perfectly mount the hard drive and store files there, read/write, etc. Is there a way to install the packages into the hard drive and turn /usr to a symlink to /mnt/mydrive ?
I don't care if it's a bad practice or something like that. I would like to know if it's feasible and if so, some instructions and/or recommendations on how to achieve it.
apt live-usb lubuntu
New contributor
Problem:
I have a Lubuntu persistent USB install. I started using it due to problems with my hard drive (Samsung 850 Evo) which used to have Ubuntu installed. My computer (MacBook Pro 9,2) had OSX but after a filesystem corruption I installed Ubuntu. Ubuntu became unbootable shortly after (literally a couple reboots). I formated the disk and decided to start using the live USB with persistence enabled.
Question:
I can't install more packages because I have almost no space left on my 4GB USB. I can perfectly mount the hard drive and store files there, read/write, etc. Is there a way to install the packages into the hard drive and turn /usr to a symlink to /mnt/mydrive ?
I don't care if it's a bad practice or something like that. I would like to know if it's feasible and if so, some instructions and/or recommendations on how to achieve it.
apt live-usb lubuntu
apt live-usb lubuntu
New contributor
New contributor
New contributor
asked Nov 19 at 15:25
Maganna Dev
263
263
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
If you are ready to download and install package by package you can use dpkg
option --instdir
For more info what this do you can check with man dpkg
For apt
I am not sure you have such option
So I should uninstall packages installed via apt, and reinstall them usingdpkg
with--instdir
option? I'm also guessing that I need to add/mnt/mydrive
to my$PATH
.
– Maganna Dev
Nov 19 at 15:46
@MagannaDev actually you need to add/mnt/mydrive/bin
,/mnt/mydrive/sbin
and so on. And to add in/etc/fstab
this partition. And yes, you can deinstall and then install in new path. Also you should take care about libraries (LD_LIBRARY_PATH
or whatever it is in Debian/Ubuntu)
– Romeo Ninov
Nov 19 at 15:50
@MagannaDev, maybe you can simplify a lot by just buy 32GB flash drive :)
– Romeo Ninov
Nov 19 at 15:54
1
Probably. Thank you very much.
– Maganna Dev
Nov 19 at 16:00
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
If you are ready to download and install package by package you can use dpkg
option --instdir
For more info what this do you can check with man dpkg
For apt
I am not sure you have such option
So I should uninstall packages installed via apt, and reinstall them usingdpkg
with--instdir
option? I'm also guessing that I need to add/mnt/mydrive
to my$PATH
.
– Maganna Dev
Nov 19 at 15:46
@MagannaDev actually you need to add/mnt/mydrive/bin
,/mnt/mydrive/sbin
and so on. And to add in/etc/fstab
this partition. And yes, you can deinstall and then install in new path. Also you should take care about libraries (LD_LIBRARY_PATH
or whatever it is in Debian/Ubuntu)
– Romeo Ninov
Nov 19 at 15:50
@MagannaDev, maybe you can simplify a lot by just buy 32GB flash drive :)
– Romeo Ninov
Nov 19 at 15:54
1
Probably. Thank you very much.
– Maganna Dev
Nov 19 at 16:00
add a comment |
up vote
1
down vote
accepted
If you are ready to download and install package by package you can use dpkg
option --instdir
For more info what this do you can check with man dpkg
For apt
I am not sure you have such option
So I should uninstall packages installed via apt, and reinstall them usingdpkg
with--instdir
option? I'm also guessing that I need to add/mnt/mydrive
to my$PATH
.
– Maganna Dev
Nov 19 at 15:46
@MagannaDev actually you need to add/mnt/mydrive/bin
,/mnt/mydrive/sbin
and so on. And to add in/etc/fstab
this partition. And yes, you can deinstall and then install in new path. Also you should take care about libraries (LD_LIBRARY_PATH
or whatever it is in Debian/Ubuntu)
– Romeo Ninov
Nov 19 at 15:50
@MagannaDev, maybe you can simplify a lot by just buy 32GB flash drive :)
– Romeo Ninov
Nov 19 at 15:54
1
Probably. Thank you very much.
– Maganna Dev
Nov 19 at 16:00
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
If you are ready to download and install package by package you can use dpkg
option --instdir
For more info what this do you can check with man dpkg
For apt
I am not sure you have such option
If you are ready to download and install package by package you can use dpkg
option --instdir
For more info what this do you can check with man dpkg
For apt
I am not sure you have such option
answered Nov 19 at 15:31
Romeo Ninov
4,98431627
4,98431627
So I should uninstall packages installed via apt, and reinstall them usingdpkg
with--instdir
option? I'm also guessing that I need to add/mnt/mydrive
to my$PATH
.
– Maganna Dev
Nov 19 at 15:46
@MagannaDev actually you need to add/mnt/mydrive/bin
,/mnt/mydrive/sbin
and so on. And to add in/etc/fstab
this partition. And yes, you can deinstall and then install in new path. Also you should take care about libraries (LD_LIBRARY_PATH
or whatever it is in Debian/Ubuntu)
– Romeo Ninov
Nov 19 at 15:50
@MagannaDev, maybe you can simplify a lot by just buy 32GB flash drive :)
– Romeo Ninov
Nov 19 at 15:54
1
Probably. Thank you very much.
– Maganna Dev
Nov 19 at 16:00
add a comment |
So I should uninstall packages installed via apt, and reinstall them usingdpkg
with--instdir
option? I'm also guessing that I need to add/mnt/mydrive
to my$PATH
.
– Maganna Dev
Nov 19 at 15:46
@MagannaDev actually you need to add/mnt/mydrive/bin
,/mnt/mydrive/sbin
and so on. And to add in/etc/fstab
this partition. And yes, you can deinstall and then install in new path. Also you should take care about libraries (LD_LIBRARY_PATH
or whatever it is in Debian/Ubuntu)
– Romeo Ninov
Nov 19 at 15:50
@MagannaDev, maybe you can simplify a lot by just buy 32GB flash drive :)
– Romeo Ninov
Nov 19 at 15:54
1
Probably. Thank you very much.
– Maganna Dev
Nov 19 at 16:00
So I should uninstall packages installed via apt, and reinstall them using
dpkg
with --instdir
option? I'm also guessing that I need to add /mnt/mydrive
to my $PATH
.– Maganna Dev
Nov 19 at 15:46
So I should uninstall packages installed via apt, and reinstall them using
dpkg
with --instdir
option? I'm also guessing that I need to add /mnt/mydrive
to my $PATH
.– Maganna Dev
Nov 19 at 15:46
@MagannaDev actually you need to add
/mnt/mydrive/bin
, /mnt/mydrive/sbin
and so on. And to add in /etc/fstab
this partition. And yes, you can deinstall and then install in new path. Also you should take care about libraries (LD_LIBRARY_PATH
or whatever it is in Debian/Ubuntu)– Romeo Ninov
Nov 19 at 15:50
@MagannaDev actually you need to add
/mnt/mydrive/bin
, /mnt/mydrive/sbin
and so on. And to add in /etc/fstab
this partition. And yes, you can deinstall and then install in new path. Also you should take care about libraries (LD_LIBRARY_PATH
or whatever it is in Debian/Ubuntu)– Romeo Ninov
Nov 19 at 15:50
@MagannaDev, maybe you can simplify a lot by just buy 32GB flash drive :)
– Romeo Ninov
Nov 19 at 15:54
@MagannaDev, maybe you can simplify a lot by just buy 32GB flash drive :)
– Romeo Ninov
Nov 19 at 15:54
1
1
Probably. Thank you very much.
– Maganna Dev
Nov 19 at 16:00
Probably. Thank you very much.
– Maganna Dev
Nov 19 at 16:00
add a comment |
Maganna Dev is a new contributor. Be nice, and check out our Code of Conduct.
Maganna Dev is a new contributor. Be nice, and check out our Code of Conduct.
Maganna Dev is a new contributor. Be nice, and check out our Code of Conduct.
Maganna Dev is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f482787%2fapt-install-packages-to-a-different-location%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown