[ONE Themes and Apps] lieferant:
I have no need for the standard apps that come with LineageOS (formerly CM), because these apps are replaced by Gapps anyways. So I created a script that you can flash immediatelly after flashing a new ROM in order to have a clean install and remove these apps from the system.

Credits [MENTION=6363737]Gawd[/MENTION] for the inspiration.

What will be removed?

The script as is, will remove the following CM/LineageOS apps:

Calendar

CMFileManager

DeskClock

Eleven (Music)

Email

Calculator

Exchange

Gello (CM browser)

Screencast

AudioFX

Contacts

AS OF 01.March 17 - Android Browser

AS OF 01.March 17 - Substratum

AS OF 25.March 17 - Masquerade App

AS OF 25.March 17 - Pico TTS

AS OF 22.June 17 - Documents

AS OF 22.June 17 - Messaging

AS OF 22.June 17 - Phone

AS OF 22.June 17 - Daydream

AS OF 22.June 17 - Jelly

AS OF 22.June 17 - Snap Camera

AS OF 22.June 17 - Gallery2

AS OF 22.June 17 - LivePhotos

AS OF 22.June 17 - WallpaperTable

How to apply?

It's best to stick to a certain installation order to make sure to avoid conflicts.

My suggested way of installing a ROM is like that:

Deep wipe

Install ROM

Install alternative kernel if you wish

Run debloat script

Install Gapps

Reboot

What else?

This script will survive dirty flashes as well as ota updates. So there's no apparent need to flash it again after that. Clean flashes will ofcourse need it to be flashed again.

I would like to remove more / less apps...

No problem. Just follow these instructions:

OK now, we are good to go:

1. Download and install Notepad++

2. Download the attached .zip file and extract it. Go to META-INF → com → google → android.

Now you will see a filed named updater-script. This it the file that will do all the magic, so be careful. Now: right click on it and open it with Notepad++.

3. Now on Notepad++

a) Select Encoding → Encode in ANSI

b) Select Edit → EOL Conversion → UNIX/OSX Format (not necessary in all cases)

4. Go ahead an add or remove apps as you wish.

delete_recursive(
"/system/app/Calendar",
"/system/app/CMFileManager",
"/system/app/DeskClock",
"/system/priv-app/Eleven", >>>> [COLOR="Red"]Changed to priv-app as of 15.08.2017 [/COLOR]
"/system/app/Email",
"/system/app/ExactCalculator",
"/system/app/Exchange2",
"/system/app/Gello",
"/system/app/Substratum", >>>> [COLOR="Red"]New as of 01.03.2017 [/COLOR]
"/system/app/Browser", >>>> [COLOR="Red"]New as of 01.03.2017 [/COLOR]
"/system/priv-app/masquerade",>>>> [COLOR="Red"]New as of 25.03.2017 [/COLOR]
"/system/priv-app/Recoder", >>>> [COLOR="Red"]New as of 31.01.2017 - replaces Screencast App[/COLOR]
"/system/priv-app/AudioFX",
"/system/priv-app/Contacts",
"/system/tts", >>>> [COLOR="Red"]New as of 25.03.2017 [/COLOR]
"/system/lib/libttspico.so", >>>> [COLOR="Red"]New as of 25.03.2017 [/COLOR]
"/system/app/PicoTts", >>>> [COLOR="Red"]New as of 25.03.2017 [/COLOR]
"/system/priv-app/DocumentsUI", >>>> [COLOR="Red"]New as of 22.06.2017 [/COLOR]
"/system/app/messaging", >>>> [COLOR="Red"]New as of 22.06.2017 [/COLOR]
"/system/app/BasicDreams", >>>> [COLOR="Red"]New as of 22.06.2017 [/COLOR]
"/system/priv-app/Dialer", >>>> [COLOR="Red"]New as of 22.06.2017 [/COLOR]
"/system/priv-app/Gallery2", >>>> [COLOR="Red"]New as of 22.06.2017 [/COLOR]
"/system/app/PhotoTable", >>>> [COLOR="Red"]New as of 22.06.2017 [/COLOR]
"/system/app/LiveWallpapersPicker", >>>> [COLOR="Red"]New as of 22.06.2017 [/COLOR]
"/system/app/Jelly", >>>> [COLOR="Red"]New as of 22.06.2017 [/COLOR]
"/system/priv-app/Snap" >>>> [COLOR="Red"]New as of 22.06.2017 [/COLOR]
);

5. Now save the updater-script and exit from Notepad++.

6. The next thing to do is create the flashable zip.

a) Make sure that the updater-scipt is in META-INF → com → google → android

b) Make sure the folder "system" in the root directory is empty.

c) Select both META-INF and system folder and right click on them.

d) Select Add to archive.

e) Archive format: ZIP

f) Compression method Store

---> The Archive format and the Compression method are very important, so make sure they are ZIP and STORE.

g) Now copy the zip file you created in your phone and flash it!

That's it.