Jellyfin Forum
Completely reinstalling jellyfin - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Completely reinstalling jellyfin (/t-completely-reinstalling-jellyfin)



Completely reinstalling jellyfin - martyc1981 - 2024-08-25

so, I have completely screwed up my jellyfin install trying to alter system files with a wordprocessing app. Which saved a bunch of non-unicode date into the file. Causing the server to not start up. So I tried to reinstall all the files, but that just left me with a load of other issues. Then I tried to delete the /usr/share/Jellyfin directory and reinstall the whole thing. But that just caused more problems.

What I need is a complete deletion of Jellyfin from my system so I can just get it running and start again. I've tried sudo apt purge jellyfin, sudo apt remove jellyfin but nothing works, when I try to reinstall through the command line, I keep getting the error message saying "Jellyfin is already installed". How can I completely purge jellyfin from my system?


RE: Completely reinstalling jellyfin - TheDreadPirate - 2024-08-25

Code:
sudo apt purge jellyfin*
sudo rm -rf /var/lib/jellyfin /var/log/jellyfin /var/cache/jellyfin /etc/jellyfin /usr/share/jellyfin
curl https://repo.jellyfin.org/install-debuntu.sh | sudo bash

The asterisk in the apt command is important. It makes sure that it installs jellyfin-server jellyfin-web jellyfin-ffmpeg and the meta package "jellyfin".


RE: Completely reinstalling jellyfin - phuzzy - 2024-11-22

This was helpful and pointed me in the right direction. I had to take additional steps for my uninstall, and the order mattered. When running the purge, first, it erred when trying to take out the service. After I ran your rm -rf step, it still erred on the service. I had to remove the service and went ahead and locate(d) everywhere jellyfin was. After rm everything below, the purge worked and the server installed, wonderfully.
Kubuntu 24.04

Code:
sudo rm -rf /var/lib/jellyfin /var/log/jellyfin /var/cache/jellyfin /etc/jellyfin /usr/share/jellyfin /etc/systemd/system/multi-user.target.wants/jellyfin.service /etc/systemd/system/jellyfin.service.d /etc/default/jellyfin /usr/lib/jellyfin /usr/lib/jellyfin-ffmpeg/ /usr/lib/systemd/system/jellyfin.service
sudo apt purge jellyfin*
curl https://repo.jellyfin.org/install-debuntu.sh | sudo bash



RE: Completely reinstalling jellyfin - TheDreadPirate - 2024-11-22

Did you make changes to the jellyfin.service file or /etc/default/jellyfin?


RE: Completely reinstalling jellyfin - phuzzy - 2024-11-22

(2024-11-22, 01:47 PM)TheDreadPirate Wrote: Did you make changes to the jellyfin.service file or /etc/default/jellyfin?
Loads... I updated my router to a new device, used same WiFi network name and password, and it broke Jellyfin from working because my IP changed. I went through and assigned a static IP to my server and setup port-forwarding but it never came back. The service would start, when I immediately checked systemctl but if I took 10 seconds to check, it reported "loaded | failed | failed". Checking logs kept reporting no perms to migrations.xml. After I blasted the directory with 775, the service would start and stay up but then kept receiving SQL 8 ERR with permission on db. I searched many articles but never could figure it out... So, yes, I was getting desperate and trying different things with setting user/group in the service conf and service but was also setting things back when it didn't work. Here are the two things I mentioned about the permissions on the migrations.xml and SQL 8 perm issue
Permission Denied on migrations.xml (but suspect it was the entire directory but that is the file it starts on and stopped)
Code:
Nov 22 00:35:29 the-***** systemd[1]: Started jellyfin.service - Jellyfin Media Server.
Nov 22 00:35:29 the-***** (jellyfin)[11980]: jellyfin.service: Changing to the requested working directory failed: Permission denied
Nov 22 00:35:29 the-***** systemd[1]: jellyfin.service: Main process exited, code=exited, status=200/CHDIR
Nov 22 00:35:29 the-***** systemd[1]: jellyfin.service: Failed with result 'exit-code'.
Nov 22 00:35:30 the-***** systemd[1]: jellyfin.service: Scheduled restart job, restart counter is at 5.
Nov 22 00:35:30 the-***** systemd[1]: jellyfin.service: Start request repeated too quickly.
Nov 22 00:35:30 the-***** systemd[1]: jellyfin.service: Failed with result 'exit-code'.
Nov 22 00:35:30 the-***** systemd[1]: Failed to start jellyfin.service - Jellyfin Media Server.
Nov 22 00:41:14 the-***** systemd[1]: Started jellyfin.service - Jellyfin Media Server.
Nov 22 00:41:14 the-***** (jellyfin)[12239]: jellyfin.service: Referenced but unset environment variable evaluates to an empty string: JELLYFIN_NOWEBAPP_OPT, JELLYFIN_SERVICE_OPT
Nov 22 00:41:14 the-***** jellyfin[12239]: [00:41:14] [INF] Jellyfin version: 10.10.3
Nov 22 00:41:14 the-***** jellyfin[12239]: [00:41:14] [INF] Environment Variables: ["[JELLYFIN_DATA_DIR, /var/lib/jellyfin]", "[JELLYFIN_CONFIG_DIR, /etc/jellyfin]", "[JELLYFIN_ADDITIONAL_OPTS, ]", "[JELLYFIN_USER, jellyfin]", "[JELLYFIN_FFMPEG_OPT, --ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg]", "[JELLYFIN_ARGS, $JELLYFIN_WEB_OPT $JELLYFIN_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT $JELLFIN_ADDITIONAL_OPTS --datadir $JELLYFIN_DATA_DIR --configdir $JELLYFIN_CONFIG_DIR --logdir $JELLYFIN_LOG_DIR --cachedir $JELLYFIN_CACHE_DIR]", "[JELLYFIN_LOG_DIR, /var/log/jellyfin]", "[JELLYFIN_WEB_OPT, --webdir=/usr/share/jellyfin/web]", "[JELLYFIN_CACHE_DIR, /var/cache/jellyfin]"]
Nov 22 00:41:14 the-***** jellyfin[12239]: [00:41:14] [INF] Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll", "--webdir=/usr/share/jellyfin/web", "--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg"]
Nov 22 00:41:14 the-***** jellyfin[12239]: [00:41:14] [INF] Operating system: Ubuntu 24.04.1 LTS
Nov 22 00:41:14 the-***** jellyfin[12239]: [00:41:14] [INF] Architecture: X64
Nov 22 00:41:14 the-***** jellyfin[12239]: [00:41:14] [INF] 64-Bit Process: True
Nov 22 00:41:14 the-***** jellyfin[12239]: [00:41:14] [INF] User Interactive: True
Nov 22 00:41:14 the-***** jellyfin[12239]: [00:41:14] [INF] Processor count: 4
Nov 22 00:41:14 the-***** jellyfin[12239]: [00:41:14] [INF] Program data path: /var/lib/jellyfin
Nov 22 00:41:14 the-***** jellyfin[12239]: [00:41:14] [INF] Log directory path: /var/log/jellyfin
Nov 22 00:41:14 the-***** jellyfin[12239]: [00:41:14] [INF] Config directory path: /etc/jellyfin
Nov 22 00:41:14 the-***** jellyfin[12239]: [00:41:14] [INF] Cache path: /var/cache/jellyfin
Nov 22 00:41:14 the-***** jellyfin[12239]: [00:41:14] [INF] Temp directory path: /tmp/jellyfin
Nov 22 00:41:14 the-***** jellyfin[12239]: [00:41:14] [INF] Web resources path: /usr/share/jellyfin/web
Nov 22 00:41:14 the-***** jellyfin[12239]: [00:41:14] [INF] Application directory: /usr/lib/jellyfin/bin/
Nov 22 00:41:14 the-***** jellyfin[12239]: [00:41:14] [FTL] Unhandled Exception
Nov 22 00:41:14 the-***** jellyfin[12239]: System.UnauthorizedAccessException: Access to the path '/etc/jellyfin/migrations.xml' is denied.
Nov 22 00:41:14 the-***** jellyfin[12239]:  ---> System.IO.IOException: Permission denied
Nov 22 00:41:14 the-***** jellyfin[12239]:    --- End of inner exception stack trace ---

SQL 8 Permission Issue (gave up trying to figure this one out and found this article)
Code:
Nov 22 01:12:59 the-***** jellyfin[23885]: [01:12:59] [INF] Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll", "--webdir=/usr/share/jellyfin/web", "--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg"]
Nov 22 01:12:59 the-***** jellyfin[23885]: [01:12:59] [INF] Operating system: Ubuntu 24.04.1 LTS
Nov 22 01:12:59 the-***** jellyfin[23885]: [01:12:59] [INF] Architecture: X64
Nov 22 01:12:59 the-***** jellyfin[23885]: [01:12:59] [INF] 64-Bit Process: True
Nov 22 01:12:59 the-***** jellyfin[23885]: [01:12:59] [INF] User Interactive: True
Nov 22 01:12:59 the-***** jellyfin[23885]: [01:12:59] [INF] Processor count: 4
Nov 22 01:12:59 the-***** jellyfin[23885]: [01:12:59] [INF] Program data path: /var/lib/jellyfin
Nov 22 01:12:59 the-***** jellyfin[23885]: [01:12:59] [INF] Log directory path: /var/log/jellyfin
Nov 22 01:12:59 the-***** jellyfin[23885]: [01:12:59] [INF] Config directory path: /etc/jellyfin
Nov 22 01:12:59 the-***** jellyfin[23885]: [01:12:59] [INF] Cache path: /var/cache/jellyfin
Nov 22 01:12:59 the-***** jellyfin[23885]: [01:12:59] [INF] Temp directory path: /tmp/jellyfin
Nov 22 01:12:59 the-***** jellyfin[23885]: [01:12:59] [INF] Web resources path: /usr/share/jellyfin/web
Nov 22 01:12:59 the-***** jellyfin[23885]: [01:12:59] [INF] Application directory: /usr/lib/jellyfin/bin/
Nov 22 01:12:59 the-***** jellyfin[23885]: [01:12:59] [INF] Setting cache path: /var/cache/jellyfin
Nov 22 01:12:59 the-***** jellyfin[23885]: [01:12:59] [INF] Loading assemblies
Nov 22 01:13:00 the-***** jellyfin[23885]: [01:13:00] [INF] Defined LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]
Nov 22 01:13:00 the-***** jellyfin[23885]: [01:13:00] [INF] Defined LAN exclusions: []
Nov 22 01:13:00 the-***** jellyfin[23885]: [01:13:00] [INF] Used LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]
Nov 22 01:13:00 the-***** jellyfin[23885]: [01:13:00] [INF] Filtered interface addresses: ["127.0.0.1", "192.168.1.14"]
Nov 22 01:13:00 the-***** jellyfin[23885]: [01:13:00] [INF] Bind Addresses ["0.0.0.0"]
Nov 22 01:13:00 the-***** jellyfin[23885]: [01:13:00] [INF] Remote IP filter is Allowlist
Nov 22 01:13:00 the-***** jellyfin[23885]: [01:13:00] [INF] Filtered subnets: []
Nov 22 01:13:01 the-***** jellyfin[23885]: [01:13:01] [ERR] Failed executing DbCommand (13ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
Nov 22 01:13:01 the-***** jellyfin[23885]: SELECT COUNT(*) FROM "sqlite_master" WHERE "name" = '__EFMigrationsHistory' AND "type" = 'table';
Nov 22 01:13:01 the-***** jellyfin[23885]: [01:13:01] [FTL] Error while starting server
Nov 22 01:13:01 the-***** jellyfin[23885]: Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 8: 'attempt to write a readonly database'.
Nov 22 01:13:01 the-***** jellyfin[23885]:    at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
Nov 22 01:13:01 the-***** jellyfin[23885]:    at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements()+MoveNext()
Nov 22 01:13:01 the-***** jellyfin[23885]:    at Microsoft.Data.Sqlite.SqliteCommand.GetStatements()+MoveNext()
Nov 22 01:13:01 the-***** jellyfin[23885]:    at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
Nov 22 01:13:01 the-***** jellyfin[23885]:    at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
Nov 22 01:13:01 the-***** jellyfin[23885]:    at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()
Nov 22 01:13:01 the-***** jellyfin[23885]:    at Microsoft.Data.Sqlite.SqliteCommand.ExecuteScalar()
Nov 22 01:13:01 the-***** jellyfin[23885]:    at System.Data.Common.DbCommand.ExecuteScalarAsync(CancellationToken cancellationToken)
Nov 22 01:13:01 the-***** jellyfin[23885]: --- End of stack trace from previous location ---

Edit: Probably doesn't belong in this article - why I didn't elaborate why I nuked it all. Apology if this needs moved