maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Clean rootfs (https://talk.maemo.org/showthread.php?t=38893)

SiO2 2009-12-31 12:46

Clean rootfs
 
Guys, I don't know whether this information deserves a new topic but yesterday I've found a way to clean the N900 rootfs that worked fine on my device. Please handle this information with care, since I've read about people running ubuntu or debian who got the system erased by this command.
I've typed this (as root):

apt-get autoremove

my free rootfs increased by 8% but before I recommend to try this:

apt-get --simulate autoremove

this command simulates the autoremove action so, you can check the output in order to be sure that only useless packages will be removed.

Try also: apt-get moo

This won't help you in rootfs cleaning but is absolutely safe! ;-)

sixracer 2011-03-07 20:58

Re: Clean rootfs
 
I accidentally extracted NITDroid to my root directory (for got a cd /And). Is this a good way to clean out the excess files?

jimmybonsaville 2011-05-11 19:14

Re: Clean rootfs
 
Quote:

Originally Posted by sixracer (Post 962715)
I accidentally extracted NITDroid to my root directory (for got a cd /And). Is this a good way to clean out the excess files?

ive done the exact same thing grrrrr lol

prankster 2011-07-07 11:04

Re: Clean rootfs
 
how to remove useless config.files ? the packages i have already uninstalled through HAM ,but still i can see some of their files in Filebox..
how to get rid of all of them ?
how to do this safely ?

jedi 2011-07-07 11:06

Re: Clean rootfs
 
Quote:

Originally Posted by prankster (Post 1046321)
how to remove useless config.files ? the packages i have already uninstalled through HAM ,but still i can see some of their files in Filebox..
how to get rid of all of them ?
how to do this safely ?

Try something like:
Code:

apt-get purge <appname>

prankster 2011-07-07 11:19

Re: Clean rootfs
 
it says ..
''E:package couldnt find, <app> not installed so not removed ''
nothing happened i guess,still files can be seen in filebox,rootfs hasnt freed too.

jedi 2011-07-07 11:34

Re: Clean rootfs
 
Quote:

Originally Posted by prankster (Post 1046333)
it says ..
''E:package couldnt find, <app> not installed so not removed ''
nothing happened i guess,still files can be seen in filebox,rootfs hasnt freed too.

Yes, use purge for installed apps...

prankster 2011-07-07 15:49

Re: Clean rootfs
 
thanks but what about those config.files appearing in the filebox,i already have uninstalled those apps through HAM..so any solution for that buddy ?

khuong 2011-07-07 15:59

Re: Clean rootfs
 
Quote:

Originally Posted by prankster (Post 1046457)
thanks but what about those config.files appearing in the filebox,i already have uninstalled those apps through HAM..so any solution for that buddy ?

dpkg -l | grep ^rc (this command will show you a list of apps configuration files still left in the system from uninstalled app)
dpkg --purge <appname> (This will remove it)

forsagar 2011-08-23 14:50

Re: Clean rootfs
 
Quote:

Originally Posted by jimmybonsaville (Post 1004380)
ive done the exact same thing grrrrr lol

so what you both did to solve this because I also did this but now can't solve this problem

SpaceShuttle N900 2012-02-08 15:21

Re: Clean rootfs
 
Quote:

Originally Posted by sixracer (Post 962715)
I accidentally extracted NITDroid to my root directory (for got a cd /And). Is this a good way to clean out the excess files?

That's exactly what I managed to do yesterday! If anyone knows what to do now, please share your knowledge.

I was installing NITDroid following the instructions shown in this video: http://www.youtube.com/watch?v=HF0uv0nJIj0 and I'm 100% sure I did everything precisely as in the video. My SD card was brand new, plugged it in straight from the package before trying to install NITDroid. What the heck went wrong?

Joseph9560 2012-02-08 16:28

Re: Clean rootfs
 
Quote:

Originally Posted by khuong (Post 1046462)
dpkg -l | grep ^rc (this command will show you a list of apps configuration files still left in the system from uninstalled app)
dpkg --purge <appname> (This will remove it)

I got a huge list of config files. Anyway to delete all those (that are not required) files at once?

michaaa62 2012-02-08 17:22

Re: Clean rootfs
 
Quote:

Originally Posted by Joseph9560 (Post 1162228)
I got a huge list of config files. Anyway to delete all those (that are not required) files at once?

May be this even might be done with a one-liner, but i use those two lines
Code:

dpkg -l |awk '/^rc/{ print $2 }' > list
dpkg --purge $(<list)


peter2p 2012-02-08 19:08

Re: Clean rootfs
 
To Clean rootfs or Free up rootfs space, there's a WIKI page.
The most effective i did was Moving the microb-engine (has to be done as root) will save 13.9 Mb:
these are the commands
Code:

mv /usr/share/microb-engine /home/opt
ln -s /home/opt/microb-engine /usr/share/microb-engine

Warning !
First save both commands on a file on your N900 to be sure.
If you do the first command and you lost connection, opening pages is not possible.
Also found the browser opening pages takes a while...
To speed up microb again, this can help you and there's no difference anymore :)

misterc 2012-02-08 19:21

Re: Clean rootfs
 
Quote:

Originally Posted by SiO2 (Post 447858)
Guys, I don't know whether this information deserves a new topic but yesterday I've found a way to clean the N900 rootfs that worked fine on my device. Please handle this information with care, since I've read about people running ubuntu or debian who got the system erased by this command.
I've typed this (as root):

apt-get autoremove

my free rootfs increased by 8% but before I recommend to try this:

apt-get --simulate autoremove

this command simulates the autoremove action so, you can check the output in order to be sure that only useless packages will be removed.

Try also: apt-get moo

This won't help you in rootfs cleaning but is absolutely safe! ;-)

Code:

Nokia-N900:~# rm /var/lib/dpkg/*.old
routinely frees up to 5 MB

Joseph9560 2012-02-14 05:14

Re: Clean rootfs
 
Quote:

Originally Posted by misterc (Post 1162332)
Code:

Nokia-N900:~# rm /var/lib/dpkg/*.old
routinely frees up to 5 MB

I don't see anything like that in my N900, thought I can see something like /var/lib/dpkg/*old

There seems to be three files that would match the criteria and would free up about 2.7Mb in my case. Is that what you are talking about? Or is it indeed *.old?

Joseph9560 2012-02-14 05:21

Re: Clean rootfs
 
Quote:

Originally Posted by michaaa62 (Post 1162261)
May be this even might be done with a one-liner, but i use those two lines
Code:

dpkg -l |awk '/^rc/{ print $2 }' > list
dpkg --purge $(<list)


Doesn't seems to work with and without root.

dpkg: --purge needs at least one package name argument.

Joseph9560 2012-02-14 05:35

Re: Clean rootfs
 
"dpkg -l | grep ^rc | cut -d " " -f 3 | xargs dpkg --purge" as root worked. About 1.5Mb root space freed.

misterc 2012-02-16 12:08

Re: Clean rootfs
 
Quote:

Originally Posted by Joseph9560 (Post 1164747)
I don't see anything like that in my N900, thought I can see something like /var/lib/dpkg/*old

There seems to be three files that would match the criteria and would free up about 2.7Mb in my case. Is that what you are talking about? Or is it indeed *.old?

my mistake, indeed...
meant to be
Code:

Nokia-N900:~# rm /var/lib/dpkg/*~old
guess *old amounts to the same

misterc 2012-02-16 12:27

Re: Clean rootfs
 
here is a wiki page that 'optifies' a few packages part of Maemo core (thus, can't be optified prior to install, any more, obviously :p
alas :mad:
CSSU, anyone :D )

Free up rootfs space

YMMV...
Quote:

Some instructions here may cause serious problems. When unsure, see General precautions
Backing up your data is recommended. In case of trouble you might need to re-flash your device.
here are most lines...
Code:

rm /var/lib/dpkg/*old
mv /usr/share/nokia-maps /home/opt/
ln -s /home/opt/nokia-maps /usr/share/nokia-maps
mv /usr/share/microb-engine /home/opt
ln -s /home/opt/microb-engine /usr/share/microb-engine
mv /usr/share/fonts /home/opt
ln -s /home/opt/fonts /usr/share/fonts
mv /usr/share/locale /opt
ln -s /opt/locale /usr/share/locale
mv /usr/share/themes/ /home/opt/usr/share/themes
ln -s /home/opt/usr/share/themes /usr/share/themes
dpkg --purge tutorial-home-applet
dpkg -l|grep ^rc

last command has been rewritten by Joseph9560 as
Code:

dpkg -l | grep ^rc | cut -d " " -f 3 | xargs dpkg --purge
nota bene: moving & relinking the theme part means you can't install any new themes unless you delete the link & move the files back to their original place...

i use those exact instructions routinely when reflashing my N900s (now mostly the test model :cool:) and never had any problems
then again, i don't give a darn about themes :rolleyes:

szopin 2012-02-16 14:17

Re: Clean rootfs
 
Ouch. After:

dpkg -l | grep ^rc | cut -d " " -f 3 | xargs dpkg --purge

my free rootfs space went from 30.6 to 29.4!?! Any idea what went wrong or where the missing 1.2mb is from?

reinob 2012-02-16 14:52

Re: Clean rootfs
 
@szopin,

LOL :) Could be that the dpkg log (I suppose there's some log somewhere) grew more than the config files that were deleted :)

Are you sure you measured free space right before and after the dpkg command?

szopin 2012-02-16 15:11

Re: Clean rootfs
 
Yeah, was doing steps from this thread and checking 'df -h /' after each. Strangely enough microb-engine gave me only ~7mb and microb seems to start up faster (compression on rootfs?). Now to find that dpkg log, if it grew by 1mb and is on rootfs optifying that should give lots more free space...

szopin 2012-02-16 15:16

Re: Clean rootfs
 
Got it:
rm /var/lib/dpkg/*old
should be executed last, or new -old files get created.

WeASeL... 2013-03-17 18:25

Re: Clean rootfs
 
I followed these instructions and now my media doesn't play in open media player or the regular media player. As a matter of fact my media played shows 'No music', 'No videos' etc...

Opera stopped working past log in prompts etc...


Quote:

Originally Posted by misterc (Post 1165772)
here is a wiki page that 'optifies' a few packages part of Maemo core (thus, can't be optified prior to install, any more, obviously :p
alas :mad:
CSSU, anyone :D )

Free up rootfs space

YMMV...


here are most lines...
Code:

rm /var/lib/dpkg/*old
mv /usr/share/nokia-maps /home/opt/
ln -s /home/opt/nokia-maps /usr/share/nokia-maps
mv /usr/share/microb-engine /home/opt
ln -s /home/opt/microb-engine /usr/share/microb-engine
mv /usr/share/fonts /home/opt
ln -s /home/opt/fonts /usr/share/fonts
mv /usr/share/locale /opt
ln -s /opt/locale /usr/share/locale
mv /usr/share/themes/ /home/opt/usr/share/themes
ln -s /home/opt/usr/share/themes /usr/share/themes
dpkg --purge tutorial-home-applet
dpkg -l|grep ^rc

last command has been rewritten by Joseph9560 as
Code:

dpkg -l | grep ^rc | cut -d " " -f 3 | xargs dpkg --purge
nota bene: moving & relinking the theme part means you can't install any new themes unless you delete the link & move the files back to their original place...

i use those exact instructions routinely when reflashing my N900s (now mostly the test model :cool:) and never had any problems
then again, i don't give a darn about themes :rolleyes:


no0b 2014-01-09 15:24

Re: Clean rootfs
 
Quote:

Originally Posted by SiO2 (Post 447858)
Guys, I don't know whether this information deserves a new topic but yesterday I've found a way to clean the N900 rootfs that worked fine on my device. Please handle this information with care, since I've read about people running ubuntu or debian who got the system erased by this command.
I've typed this (as root):

apt-get autoremove

my free rootfs increased by 8% but before I recommend to try this:

apt-get --simulate autoremove

this command simulates the autoremove action so, you can check the output in order to be sure that only useless packages will be removed.

Try also: apt-get moo

This won't help you in rootfs cleaning but is absolutely safe! ;-)

how exactly do i use these things?

michaaa62 2014-01-09 17:22

Re: Clean rootfs
 
If you used some Application Manager to install or remove packages, there is no need for the autoremove, because that is invoked by those Application Managers.

If you did not use the Application Manager, but apt-get in X-Terminal you could use the command as root to erase the downloaded installable packages after the installation.


All times are GMT. The time now is 04:56.

vBulletin® Version 3.8.8