IPTVBlog
Search IPTVBlog

GuideLegacy software· intermediate

How to uninstall Xtream UI cleanly: backup, export, remove (2026)

Remove Xtream UI from a main server or load balancer without losing data: what to back up and export, the uninstall steps, and the MariaDB and nginx clean-up.

By
Published
Reading time
8 min · 1,775 words

Legacy software

This guide documents Xtream UI. Xtream UI has had no official maintenance since its last public releases; XUI One is proprietary with its own licence terms. We document them because many operators still run them. Running either is your decision and your risk, and we do not link to modified or cracked builds.

This guide shows how to uninstall Xtream UI from a main server or a load balancer without losing the data you still need. It replaces a short 2023 forum answer that listed the removal commands; here we add what belongs before them, a backup and an export, and what belongs after them, the clean-up of MariaDB, nginx, mounts and system accounts that the old commands left half done.

The reason this article exists at all: Xtream UI is unmaintained. The last widely used releases date from the 2021 era, its bundled nginx and PHP are frozen at those versions, and nobody patches them. If you still run it, you run it at your own risk; most operators reading this are leaving it, either for XUI One (see XUI One vs Xtream UI) or for a hosted panel. Whatever the destination, the first half of this guide, the backup and the export, is the part that matters. The removal commands are easy. Getting the data back after you ran them is not.

Before you start: know your layout

Xtream UI installs everything under one directory and one system user. On every server:

Item Location (typical)
Application /home/xtreamcodes/iptv_xtream_codes/
System user and group xtreamcodes
Bundled nginx /home/xtreamcodes/iptv_xtream_codes/nginx/
Bundled PHP /home/xtreamcodes/iptv_xtream_codes/php/
Temporary and stream segments (tmpfs mounts) .../iptv_xtream_codes/tmp and .../iptv_xtream_codes/streams
Encrypted config with database credentials /home/xtreamcodes/iptv_xtream_codes/config
Cron entries /etc/crontab, lines containing xtreamcodes
Sudoers entry /etc/sudoers, line containing xtreamcodes

The main server additionally runs MariaDB with the database xtream_iptvpro. The installer usually puts MariaDB on a non-standard port rather than 3306, and names the database user user_iptvpro; both come from the install output and the config file. Check your version, because community installers differed in details. Load balancers have no database; they only run the application and connect to the main server.

Find out which role each of your servers has before you type anything. Running the database removal on the only server that holds your subscriber data is the one mistake this guide cannot undo.

Step 1: Back up the main server

Do this even if you are sure you will never need the data again. Dumps are small and regret is expensive.

Database dump

Get the MariaDB port and credentials. If you did not save the install output, the credentials are in the config file, encoded; the community-maintained installers shipped a small script to decode it, and the admin panel’s settings page shows the port. Then:

mysqldump -u user_iptvpro -p -P <port> -h 127.0.0.1 \
  --single-transaction --routines --triggers \
  xtream_iptvpro > xtream_iptvpro-$(date +%F).sql
gzip xtream_iptvpro-*.sql

Open the gzip and look at the first lines. A dump that contains only a header and an error message is the most common backup failure, and you will not notice it after the database is gone.

Files

Copy these off the server as well:

  • /home/xtreamcodes/iptv_xtream_codes/config
  • /home/xtreamcodes/iptv_xtream_codes/nginx/conf/nginx.conf and anything you changed under nginx/conf/
  • custom logos, images and anything else you put under the web root (admin/ and wwwdir/ in most layouts; check your version)
  • the output of crontab -l and cat /etc/crontab, so you remember what ran

Use rsync or scp to another machine. Do not keep the only copy on the server you are about to wipe.

Load balancers

Load balancers hold nothing you need except local nginx tweaks. Copy nginx.conf if you edited it; otherwise there is nothing to back up.

Step 2: Export what you will need elsewhere

The full SQL dump is your insurance. The export is what you actually hand to the next panel. Different panels want different formats, so take both SQL and CSV while the database is still running.

What Tables in xtream_iptvpro (check your version) Why you need it
Live and VOD streams streams, streams_types, streams_categories, streams_servers Source URLs, categories, which server serves what
Bouquets bouquets How channels are grouped into packages
Subscriber lines users Usernames, passwords, expiry dates, connection limits, assigned bouquets
Resellers and admins reg_users, member_groups, packages Panel logins, credit balances, package definitions
Servers streaming_servers IPs, ports and roles of your main and load balancers
EPG sources epg The XMLTV URLs you configured
Settings settings Ports, limits, security options you tuned over the years

A CSV of a table is one command per table:

mysql -u user_iptvpro -p -P <port> -h 127.0.0.1 xtream_iptvpro \
  -e "SELECT * FROM users" --batch | sed 's/\t/,/g' > users.csv

Repeat for streams, bouquets and reg_users. If you are moving to XUI One, keep the SQL dump: its tools migration helper imports a Xtream UI database directly; see the XUI One commands reference for the command. If you are moving to a panel with an API, the CSVs are the input for your import script.

Two more things that live outside the database: the EPG XMLTV files themselves (regenerate them from the source URLs; do not copy the cache) and your DNS. Note which hostnames and ports your clients currently use. Keeping the same hostname and port on the new panel is the difference between a silent migration and a week of support tickets.

Step 3: Stop the panel on every server

On the main server and on each load balancer, as root:

pkill -u xtreamcodes
pkill -f iptv_xtream_codes/nginx
pkill -f iptv_xtream_codes/php

The 2023 forum answer killed every php and nginx process on the machine. Do not do that on a server that runs anything else; the pattern above targets only the Xtream UI binaries. Give it a few seconds, then confirm nothing is left:

ps -u xtreamcodes
ss -tlnp | grep -E ':(25500|25461|25462|8080)\b'

Replace the port list with the ports your installation actually used; 25500 for the admin panel and 25461/25462 for clients were the defaults in most builds. Check your version.

Step 4: Remove the database (main server only)

Skip this step on load balancers. Skip it on the main server too if another application shares the database engine; drop the xtream_iptvpro database and the user_iptvpro user instead.

If the server exists only for Xtream UI, remove the engine completely. Xtream UI’s installers set up MariaDB; some older installs have MySQL. Purge whichever is present:

systemctl stop mariadb mysql 2>/dev/null
apt purge -y 'mariadb-*' 'mysql-*'
apt autoremove -y
rm -rf /etc/mysql /var/lib/mysql /var/log/mysql

Confirm with dpkg -l | grep -E 'mariadb|mysql' that nothing is left. Only now is your SQL dump the only copy of the data, which is why Step 1 came first.

Step 5: Remove the application and its footprint

On every server, as root. The order matters: unmount first, then edit system files, then delete.

Unmount tmpfs

Xtream UI mounts tmp and streams as tmpfs so segments live in RAM. If you delete the directory while it is mounted, you delete the mount point, not the files, and the fstab entry keeps the server from booting cleanly.

umount -f /home/xtreamcodes/iptv_xtream_codes/streams
umount -f /home/xtreamcodes/iptv_xtream_codes/tmp

Remove the system entries

sed -i '/xtreamcodes/d' /etc/fstab
sed -i '/xtreamcodes/d' /etc/crontab
sed -i '/xtreamcodes/d' /etc/sudoers

Back up these three files before the sed if you have other entries in them; sed -i.bak keeps a copy automatically. Also check /etc/cron.d/ and /etc/rc.local; some installers started the panel from rc.local instead of a service unit. Check your version.

Remove the immutable flag and the directory

Some releases set the immutable attribute on the GeoIP database so the panel could not overwrite it. rm fails on that file until the flag is gone:

chattr -i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb 2>/dev/null
rm -rf /home/xtreamcodes

If rm -rf fails, check lsattr -R /home/xtreamcodes | grep -- '-i-' for other immutable files.

Remove the user and group

deluser xtreamcodes
groupdel xtreamcodes 2>/dev/null

deluser on Ubuntu removes the group as well when nothing else uses it, so the groupdel is a safety net.

Leftover packages

The old installers pulled in a few packages that nothing else on the server needs, libcurl3 on 18.04-era builds among them. Run apt autoremove -y and look at what it proposes. Do not remove packages you do not recognise just because the old guide listed them; libcurl3 does not even exist on current Ubuntu.

Step 6: Verify, then reboot

Before the reboot:

mount | grep xtreamcodes            # nothing
grep -r xtreamcodes /etc/fstab /etc/crontab /etc/sudoers /etc/cron.d   # nothing
id xtreamcodes                      # "no such user"
ss -tlnp                            # no nginx or php from /home/xtreamcodes

Then reboot, log back in and run the same four checks. A clean boot with no mount errors and no listeners on the old ports means the uninstall is complete. If the server will host another panel, this is the point to install it. If it will host nothing, cancel it; you have the dump.

If you are reinstalling the OS instead

For a server that ran only Xtream UI, a fresh OS install from your hosting provider’s panel is quicker and leaves nothing behind. Do Steps 1 and 2 exactly as above, verify the dump on another machine, then reinstall. Everything from Step 3 on becomes unnecessary. We would choose this path whenever the server has no other job.

If you are moving to a hosted panel

Some operators leave Xtream UI for a hosted panel, where a vendor runs the panel servers, applies updates and handles the database, and you bring your streams and your customers. The trade-off is straightforward: less work and less control. You stop maintaining nginx and MariaDB; in return the vendor’s uptime, pricing and feature decisions become yours to live with.

Before you pick one, ask the same questions you would ask of any software: how do you import existing lines and streams, how do you export them again if you leave, where is the data hosted, and what does the price include. We have written up one such panel in our IPTVOS review, including what it does not do; IPTVBlog is an IPTVOS partner publication, and the review says so. Our guides index lists other migration material as it is published.

Whatever you move to, keep the SQL dump from Step 1 for a year. Line expiry disputes, reseller credit questions and “which stream was that” all come back later than you expect, and the dump is the only record you will have.

Questions people ask

Do I need to uninstall Xtream UI before installing another panel?

Yes, if you plan to reuse the server. Xtream UI leaves nginx, PHP, MariaDB, tmpfs mounts and a system user behind, and another panel's installer will collide with them. A clean OS reinstall is faster and safer than a manual clean-up when the server has nothing else on it.

Where is the Xtream UI database?

On the main server, in the MariaDB instance the installer set up, as the database xtream_iptvpro. The database user and port are in the install output and in /home/xtreamcodes/iptv_xtream_codes/config; the port is often not the default 3306, so check your version.

Can I keep my lines and streams when I move to another panel?

You keep the data: the SQL dump contains every line, stream, bouquet and reseller. Whether the new panel can import it depends on the panel. XUI One ships a migration helper for Xtream UI databases; other panels want a CSV or use their own API. Export both formats before you uninstall.

Is Xtream UI still safe to run?

No release has been maintained since the 2021-era builds. Known issues in its bundled nginx and PHP are not fixed. If you keep running it, isolate it well and plan to leave; running it is your own risk.

This article mentions IPTVOS. IPTVBlog is an IPTVOS partner publication; the claims are checked against its changelog and its limits are stated.

Topicsxtream-uioperations

This article replaces an older post from the IPTVBlog forum; the old links redirect here.

Comments

Keep reading