OpenPLi 4.0 : Free as much as possible Flash space

Posted by: Toysoft

OpenPLi 4.0 : Free as much as possible Flash space - 03/18/16 07:14 PM

Just a little script to free as much as possible Flash space,

Create a file "script.sh", set to "chmod 755 script.sh". Put the text below. You should gain around 6.5 Mb of Free Flash space, as on my DM800HD.

I kept only UK-English-French-Italian-Spanish-German, but it's easy to modify as you can see below with "#" to remove a line and keep it only as Remark.



Remember as well that to optimize the Flash at the best, during first config you must refuse the Internet test, and in the same time the automatic update of the box. As this uses more than 3.5 Mb of space for no much use.

TS


Code:
#!/bin/sh
#
#Remove from /usr/share/enigma2/countries
#
cd /usr/share/enigma2/countries
#
rm ad.png
rm ee.png
rm hr.png
rm lt.png
rm ro.png
rm ua.png
rm ae.png
#rm en.png
rm hu.png
rm lv.png
rm ru.png
rm yu.png
rm bg.png
#rm es.png
rm il.png
rm se.png
rm br.png
rm fi.png
rm ir.png
rm nl.png
rm si.png
rm cz.png
#rm fr.png
rm is.png
rm no.png
rm sk.png
#rm de.png
rm fy_NL.png    
#rm it.png
rm pl.png
rm th.png
rm dk.png
rm gr.png
rm ku.png
#rm pt.png
rm tr.png
rm hk.png
rm id.png
rm nn.png
rm zh.png
#rm missing.png
#
#Remove from /usr/share/enigma2/po
#
cd /usr/share/enigma2/po
#
rm -r ar
rm -r cs
rm -r el
rm -r et
#rm -r fr
rm -r hr
#rm -r it
rm -r lv
rm -r no
#rm -r pt_BR  
rm -r sk
rm -r sv
rm -r uk
rm -r bg
rm -r da
#rm -r en
rm -r fa
rm -r fy
rm -r hu
rm -r ku
rm -r nb
rm -r pl
rm -r ro
rm -r sl
rm -r th
rm -r ca
#rm -r de
#rm -r es
rm -r fi
rm -r he
rm -r is
rm -r lt
rm -r nl
#rm -r pt
rm -r ru
rm -r sr
rm -r tr
rm -r hk
rm -r id
rm -r nn
rm -r zh
#
#Remove not used Skins
#
rm -r /usr/share/enigma2/PLi-FullHD
rm -r /usr/share/enigma2/PLi-FullNightHD
rm -r /usr/share/enigma2/PLi-HD1
rm -r /usr/share/enigma2/PLi-HD2
#
#Remove Feeds Packages List
#
rm /var/lib/opkg/O*
rm /var/lib/opkg/lists/o*
#
#END
#


Uninstall not used Languages :

Code:
opkg remove --force-depends enigma2-locale-ar
opkg remove --force-depends enigma2-locale-bg
opkg remove --force-depends enigma2-locale-ca
opkg remove --force-depends enigma2-locale-cs
opkg remove --force-depends enigma2-locale-da
opkg remove --force-depends enigma2-locale-de
opkg remove --force-depends enigma2-locale-el
opkg remove --force-depends enigma2-locale-es
opkg remove --force-depends enigma2-locale-et
opkg remove --force-depends enigma2-locale-fa
opkg remove --force-depends enigma2-locale-fi
opkg remove --force-depends enigma2-locale-fy
opkg remove --force-depends enigma2-locale-he
opkg remove --force-depends enigma2-locale-hr
opkg remove --force-depends enigma2-locale-hu
opkg remove --force-depends enigma2-locale-is
opkg remove --force-depends enigma2-locale-ku
opkg remove --force-depends enigma2-locale-lt
opkg remove --force-depends enigma2-locale-lv
opkg remove --force-depends enigma2-locale-nb
opkg remove --force-depends enigma2-locale-nl
opkg remove --force-depends enigma2-locale-no
opkg remove --force-depends enigma2-locale-pl
opkg remove --force-depends enigma2-locale-pt
opkg remove --force-depends enigma2-locale-pt-br
opkg remove --force-depends enigma2-locale-ro
opkg remove --force-depends enigma2-locale-ru
opkg remove --force-depends enigma2-locale-sk
opkg remove --force-depends enigma2-locale-sl
opkg remove --force-depends enigma2-locale-sr
opkg remove --force-depends enigma2-locale-sv
opkg remove --force-depends enigma2-locale-th
opkg remove --force-depends enigma2-locale-tr
opkg remove --force-depends enigma2-locale-uk


Available 6.4 Mb !

Code:
root@dm800:/var/volatile/tmp# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                60.0M     53.6M      6.4M  89% /
tmpfs                    64.0K         0     64.0K   0% /media
tmpfs                    71.0M      5.4M     65.6M   8% /var/volatile
/dev/mtdblock2            3.8M      2.4M      1.3M  64% /boot



FYI :

Code:
root@dm800:/var/volatile/tmp# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                60.0M     53.6M      6.4M  89% /
tmpfs                    64.0K         0     64.0K   0% /media
/dev/sda1                74.5G     65.8G      8.7G  88% /media/hdd
tmpfs                    71.0M      5.1M     65.9M   7% /var/volatile
/dev/mtdblock2            3.8M      2.4M      1.3M  64% /boot
root@dm800:/var/volatile/tmp# opkg update
Downloading http://jam.japhar.com/feeds/OpenPLi-4/japhar/dm800/all/Packages.gz.
Updated list of available packages in /var/lib/opkg/OpenPLi-all.
Downloading http://jam.japhar.com/feeds/OpenPLi-4/japhar/dm800/dm800/Packages.gz
.
Updated list of available packages in /var/lib/opkg/OpenPLi-dm800.
Downloading http://jam.japhar.com/feeds/OpenPLi-4/japhar/dm800/mips32el-nf/Packa
ges.gz.
Updated list of available packages in /var/lib/opkg/OpenPLi-mips32el-nf.
root@dm800:/var/volatile/tmp# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                60.0M     56.5M      3.5M  94% /
tmpfs                    64.0K         0     64.0K   0% /media
/dev/sda1                74.5G     65.8G      8.7G  88% /media/hdd
tmpfs                    71.0M      5.1M     65.9M   7% /var/volatile
/dev/mtdblock2            3.8M      2.4M      1.3M  64% /boot
root@dm800:/var/volatile/tmp#


Script also available on JAM 5.2
Posted by: leenstri

Re: OpenPLi 4.0 : Free as much as possible Flash space - 03/22/16 11:55 PM

Hello,

When I try to run the script I get errors about the script cannot cd to the folders.

Any idea why that can happen?
Posted by: sinmc

Re: OpenPLi 4.0 : Free as much as possible Flash space - 03/23/16 12:23 AM

script is 755 ?

you are using openpli 4.0 image ?
Posted by: Admin

Re: OpenPLi 4.0 : Free as much as possible Flash space - 03/23/16 12:36 AM

Yes, this is for OpenPli 4.0 IPTV, you can run it directly from the JAM 5.2 on the OpenPli 4.0 Section, naturally it needs to be properly loaded/Copied in the box if you want to put it yourself. Better is use the one from JAM,

Admin
Posted by: pashaa

Re: OpenPLi 4.0 : Free as much as possible Flash space - 07/13/17 10:09 AM

/usr/share/enigma2/rc_models have many not DMM remotes with 1mb.
Posted by: Admin

Re: OpenPLi 4.0 : Free as much as possible Flash space - 07/13/17 10:13 AM

Thank you, good idea and good point !

Admin
Posted by: yra1976yan

Re: OpenPLi 4.0 : Free as much as possible Flash space - 04/16/18 05:12 AM

Originally Posted By: pashaa
/usr/share/enigma2/rc_models have many not DMM remotes with 1mb.

Ola poderia explicar sobre um pouco +.Obrigdo !!!
Posted by: Admin

Re: OpenPLi 4.0 : Free as much as possible Flash space - 04/16/18 12:03 PM

You can remove most of the files in this folder to gain more space (not the DMM...files and xml one, but all others yes if there is any),

/usr/share/enigma2/rc_models

Admin

Originally Posted By: yra1976yan
Originally Posted By: pashaa
/usr/share/enigma2/rc_models have many not DMM remotes with 1mb.

Ola poderia explicar sobre um pouco +.Obrigdo !!!
Posted by: yra1976yan

Re: OpenPLi 4.0 : Free as much as possible Flash space - 04/21/18 09:23 PM

Muitos controles.
Qual abrir a space ?
Obrigado.
Posted by: Admin

Re: OpenPLi 4.0 : Free as much as possible Flash space - 04/21/18 09:41 PM

You just need these 5 files, all others RC/files can be removed.

Admin
Posted by: windshear

Re: OpenPLi 4.0 : Free as much as possible Flash space - 11/24/19 04:10 PM

Hi Guys!
Can anyone write a short tutorial on how to use the script, where to copy it and how to run?
What it means: set to "chmod 755 script.sh" ?
JAM tool "Clean Extra Flash Memory" gives me a loop on boot.
I want to leave only Polish, English and German languages.
Thank you from the mountain smile
Regards
Posted by: Admin

Re: OpenPLi 4.0 : Free as much as possible Flash space - 11/24/19 04:28 PM

Install the image and copy/paste the lines that are not the languages you want into your box via telnet or ssh/Putty.

You need to build your own commands/script, in fact you can just send command/line after line, into the console/telnet/putty/ssh, selecting naturally the ones you want.

It's normal it goes in loop, as the script removed the Polish language, that in your case you need and probably selected at setup.

Admin

Code:
#!/bin/sh
#
#Remove from /usr/share/enigma2/countries
#
cd /usr/share/enigma2/countries
#
rm ad.png
rm ee.png
rm hr.png
rm lt.png
rm ro.png
rm ua.png
rm ae.png
#rm en.png
rm hu.png
rm lv.png
rm ru.png
rm yu.png
rm bg.png
rm es.png
rm il.png
rm se.png
rm br.png
rm fi.png
rm ir.png
rm nl.png
rm si.png
rm cz.png
rm fr.png
rm is.png
rm no.png
rm sk.png
#rm de.png
rm fy_NL.png    
rm it.png
#rm pl.png
rm th.png
rm dk.png
rm gr.png
rm ku.png
rm pt.png
rm tr.png
rm hk.png
rm id.png
rm nn.png
rm zh.png
#rm missing.png
#
#Remove from /usr/share/enigma2/po
#
cd /usr/share/enigma2/po
#
rm -r ar
rm -r cs
rm -r el
rm -r et
rm -r fr
rm -r hr
rm -r it
rm -r lv
rm -r no
rm -r pt_BR  
rm -r sk
rm -r sv
rm -r uk
rm -r bg
rm -r da
#rm -r en
rm -r fa
rm -r fy
rm -r hu
rm -r ku
rm -r nb
#rm -r pl
rm -r ro
rm -r sl
rm -r th
rm -r ca
#rm -r de
rm -r es
rm -r fi
rm -r he
rm -r is
rm -r lt
rm -r nl
rm -r pt
rm -r ru
rm -r sr
rm -r tr
rm -r hk
rm -r id
rm -r nn
rm -r zh
#
#Remove not used Skins
#
rm -r /usr/share/enigma2/PLi-FullHD
rm -r /usr/share/enigma2/PLi-FullNightHD
rm -r /usr/share/enigma2/PLi-HD1
rm -r /usr/share/enigma2/PLi-HD2
#
#Remove Feeds Packages List
#
rm /var/lib/opkg/O*
rm /var/lib/opkg/lists/o*
#
#END
#
Posted by: windshear

Re: OpenPLi 4.0 : Free as much as possible Flash space - 11/24/19 05:00 PM

Thanx for quick reply,
I have Putty 0.71 installed, but don't have any experience with using it.
Which section I put the needed lines in?
When I open SSH window I got some error on network: "Connection refused" and is inactive.
Telnet window opens well, but where to paste the lines?
Please forgive me my poor knowledge.
Thank you!
>windshear<
Posted by: Admin

Re: OpenPLi 4.0 : Free as much as possible Flash space - 11/24/19 05:31 PM

You need to put the IP address of your box, as Telnet or Putty will not be capable of "finding" your box / the IP address if you don't insert it.

Then you will just have to copy/paste the text I prepared you into the console. Then it should be done as per your wish.

Admin
Posted by: windshear

Re: OpenPLi 4.0 : Free as much as possible Flash space - 11/24/19 05:38 PM

Of course, I did put the box IP in host window, but still don't see the place to paste the text.
I open Telnet window from putty program after I set IP address of my box.
>windshear<
Posted by: windshear

Re: OpenPLi 4.0 : Free as much as possible Flash space - 11/24/19 05:40 PM

Is the place to paste the text instead of "Default Settings"?
Posted by: Admin

Re: OpenPLi 4.0 : Free as much as possible Flash space - 11/24/19 05:46 PM

Then in both cases, Telnet or SSH, it will open you a Console box (black text box), where you will have to login into the box with username and password.

Only then once you are logged in the box, you can send the commands.

Admin
Posted by: windshear

Re: OpenPLi 4.0 : Free as much as possible Flash space - 11/24/19 09:05 PM

OK, done with Telnet, thank you! smile
Nice evening!
>windshear<
Posted by: Admin

Re: OpenPLi 4.0 : Free as much as possible Flash space - 11/24/19 09:09 PM

Great, Enjoy !

Admin

Originally Posted By: windshear
OK, done with Telnet, thank you! smile
Nice evening!
>windshear<