[Samsung Galaxy Nexus] CMNein:
The old removal format no longer worked. New example below:

#!/sbin/sh
#
# /system/addon.d/91-cm.sh
# During a CM10 upgrade, this script backs up /system/etc/hosts,
# /system is formatted and reinstalled, then the file is restored.
#

. /tmp/backuptool.functions

list_files() {
cat <<EOF
xbin/su
EOF
}

case "$1" in
backup)
list_files | while read FILE DUMMY; do
backup_file $S/"$FILE"
done
;;
restore)
list_files | while read FILE REPLACEMENT; do
R=""
[ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
[ -f "$C/$S/$FILE" ] && restore_file $S/"$FILE" "$R"
done
rm /system/app/MagicSmokeWallpapers.apk
rm /system/app/PhaseBeam.apk
rm /system/app/VisualizationWallpapers.apk
rm /system/app/HoloSpiralWallpaper.apk
rm /system/app/LiveWallpapersPicker.apk
rm /system/app/LiveWallpapers.apk
rm /system/app/CMFileManager.apk
rm /system/app/CMFileManagerThemes.apk
rm /system/app/CMWallpapers.apk
rm /system/app/VideoEditor.apk
rm /system/media/audio/ringtones/Acheron.ogg
rm /system/media/audio/ringtones/Andromeda.ogg
rm /system/media/audio/ringtones/Aquila.ogg
rm /system/media/audio/ringtones/ArgoNavis.ogg
rm /system/media/audio/ringtones/BentleyDubs.ogg
rm /system/media/audio/ringtones/Big_Easy.ogg
rm /system/media/audio/ringtones/BirdLoop.ogg
rm /system/media/audio/ringtones/Bollywood.ogg
rm /system/media/audio/ringtones/Bongo.ogg
rm /system/media/audio/ringtones/Bootes.ogg
rm /system/media/audio/ringtones/Boxbeat.ogg
rm /system/media/audio/ringtones/BussaMove.ogg
rm /system/media/audio/ringtones/Cairo.ogg
rm /system/media/audio/ringtones/Calypso_Steel.ogg
rm /system/media/audio/ringtones/CanisMajor.ogg
rm /system/media/audio/ringtones/CaribbeanIce.ogg
rm /system/media/audio/ringtones/Carina.ogg
rm /system/media/audio/ringtones/Cassiopeia.ogg
rm /system/media/audio/ringtones/Champagne_Edition.ogg
rm /system/media/audio/ringtones/Club_Cubano.ogg
rm /system/media/audio/ringtones/CrayonRock.ogg
rm /system/media/audio/ringtones/CrazyDream.ogg
rm /system/media/audio/ringtones/CurveBall.ogg
rm /system/media/audio/ringtones/CyanTone.ogg
rm /system/media/audio/ringtones/Cygnus.ogg
rm /system/media/audio/ringtones/DancinFool.ogg
rm /system/media/audio/ringtones/Ding.ogg
rm /system/media/audio/ringtones/DonMessWivIt.ogg
rm /system/media/audio/ringtones/Draco.ogg
rm /system/media/audio/ringtones/DreamTheme.ogg
rm /system/media/audio/ringtones/Eastern_Sky.ogg
rm /system/media/audio/ringtones/Enter_the_Nexus.ogg
rm /system/media/audio/ringtones/Eridani.ogg
rm /system/media/audio/ringtones/EtherShake.ogg
rm /system/media/audio/ringtones/FriendlyGhost.ogg
rm /system/media/audio/ringtones/Funk_Yall.ogg
rm /system/media/audio/ringtones/GameOverGuitar.ogg
rm /system/media/audio/ringtones/Gigolo.ogg
rm /system/media/audio/ringtones/Gimme_Mo_Town.ogg
rm /system/media/audio/ringtones/Girtab.ogg
rm /system/media/audio/ringtones/Glacial_Groove.ogg
rm /system/media/audio/ringtones/Growl.ogg
rm /system/media/audio/ringtones/HalfwayHome.ogg
rm /system/media/audio/ringtones/House_of_house.ogg
rm /system/media/audio/ringtones/InsertCoin.ogg
rm /system/media/audio/ringtones/Iridium.ogg
rm /system/media/audio/ringtones/LoopyLounge.ogg
rm /system/media/audio/ringtones/LoveFlute.ogg
rm /system/media/audio/ringtones/Lyra.ogg
rm /system/media/audio/ringtones/Machina.ogg
rm /system/media/audio/ringtones/MidEvilJaunt.ogg
rm /system/media/audio/ringtones/MildlyAlarming.ogg
rm /system/media/audio/ringtones/Nairobi.ogg
rm /system/media/audio/ringtones/Nasqueron.ogg
rm /system/media/audio/ringtones/Nassau.ogg
rm /system/media/audio/ringtones/NewPlayer.ogg
rm /system/media/audio/ringtones/Noises1.ogg
rm /system/media/audio/ringtones/Noises2.ogg
rm /system/media/audio/ringtones/Noises3.ogg
rm /system/media/audio/ringtones/No_Limits.ogg
rm /system/media/audio/ringtones/OrganDub.ogg
rm /system/media/audio/ringtones/Orion.ogg
rm /system/media/audio/ringtones/Paradise_Island.ogg
rm /system/media/audio/ringtones/Pegasus.ogg
rm /system/media/audio/ringtones/Perseus.ogg
rm /system/media/audio/ringtones/Playa.ogg
rm /system/media/audio/ringtones/Raindance.ogg
rm /system/media/audio/ringtones/Revelation.ogg
rm /system/media/audio/ringtones/Rigel.ogg
rm /system/media/audio/ringtones/Road_Trip.ogg
rm /system/media/audio/ringtones/RomancingTheTone.ogg
rm /system/media/audio/ringtones/Safari.ogg
rm /system/media/audio/ringtones/Savannah.ogg
rm /system/media/audio/ringtones/Scarabaeus.ogg
rm /system/media/audio/ringtones/Sceptrum.ogg
rm /system/media/audio/ringtones/Seville.ogg
rm /system/media/audio/ringtones/Shes_All_That.ogg
rm /system/media/audio/ringtones/SilkyWay.ogg
rm /system/media/audio/ringtones/Silmarillia.ogg
rm /system/media/audio/ringtones/SitarVsSitar.ogg
rm /system/media/audio/ringtones/Solarium.ogg
rm /system/media/audio/ringtones/SpringyJalopy.ogg
rm /system/media/audio/ringtones/Steppin_Out.ogg
rm /system/media/audio/ringtones/Terminated.ogg
rm /system/media/audio/ringtones/Testudo.ogg
rm /system/media/audio/ringtones/Themos.ogg
rm /system/media/audio/ringtones/Third_Eye.ogg
rm /system/media/audio/ringtones/Thunderfoot.ogg
rm /system/media/audio/ringtones/TwirlAway.ogg
rm /system/media/audio/ringtones/UrsaMinor.ogg
rm /system/media/audio/ringtones/VeryAlarmed.ogg
rm /system/media/audio/ringtones/World.ogg
rm /system/media/audio/ringtones/Whisperer.ogg
rm /system/media/audio/ringtones/WobblyRinger.ogg
rm /system/media/audio/notifications/Adara.ogg
rm /system/media/audio/notifications/Aldebaran.ogg
rm /system/media/audio/notifications/Altair.ogg
rm /system/media/audio/notifications/Antares.ogg
rm /system/media/audio/notifications/Antimony.ogg
rm /system/media/audio/notifications/Arcturus.ogg
rm /system/media/audio/notifications/Betelgeuse.ogg
rm /system/media/audio/notifications/BrassAndroid.ogg
rm /system/media/audio/notifications/Canopus.ogg
rm /system/media/audio/notifications/Capella.ogg
rm /system/media/audio/notifications/Castor.ogg
rm /system/media/audio/notifications/CetiAlpha.ogg
rm /system/media/audio/notifications/CyanMail.ogg
rm /system/media/audio/notifications/CyanMessage.ogg
rm /system/media/audio/notifications/CyanPing.ogg
rm /system/media/audio/notifications/DearDeer.ogg
rm /system/media/audio/notifications/Deneb.ogg
rm /system/media/audio/notifications/Doink.ogg
rm /system/media/audio/notifications/DontPanic.ogg
rm /system/media/audio/notifications/Electra.ogg
rm /system/media/audio/notifications/Fomalhaut.ogg
rm /system/media/audio/notifications/Highwire.ogg
rm /system/media/audio/notifications/Hojus.ogg
rm /system/media/audio/notifications/KzurbSonar.ogg
rm /system/media/audio/notifications/Lalande.ogg
rm /system/media/audio/notifications/Merope.ogg
rm /system/media/audio/notifications/Mira.ogg
rm /system/media/audio/notifications/Naughty.ogg
rm /system/media/audio/notifications/OnTheHunt.ogg
rm /system/media/audio/notifications/Polaris.ogg
rm /system/media/audio/notifications/Pollux.ogg
rm /system/media/audio/notifications/Pong.ogg
rm /system/media/audio/notifications/Procyon.ogg
rm /system/media/audio/notifications/Proxima.ogg
rm /system/media/audio/notifications/Radon.ogg
rm /system/media/audio/notifications/Rang.ogg
rm /system/media/audio/notifications/Regulus.ogg
rm /system/media/audio/notifications/Shaula.ogg
rm /system/media/audio/notifications/Sirius.ogg
rm /system/media/audio/notifications/Sirrah.ogg
rm /system/media/audio/notifications/Spica.ogg
rm /system/media/audio/notifications/Stone.ogg
rm /system/media/audio/notifications/Tejat.ogg
rm /system/media/audio/notifications/Upsilon.ogg
rm /system/media/audio/notifications/Vega.ogg
rm /system/media/audio/notifications/Voila.ogg
;;
pre-backup)
# Stub
;;
post-backup)
# Stub
;;
pre-restore)
# Stub
;;
post-restore)
# Stub
;;
esac