• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting Completely reinstalling jellyfin

     
    • 0 Vote(s) - 0 Average

    Completely reinstalling jellyfin

    Completely ruined my jellyfin install on Linux.
    martyc1981
    Offline

    Junior Member

    Posts: 10
    Threads: 5
    Joined: 2024 May
    Reputation: 0
    Country:United Kingdom
    #1
    2024-08-25, 03:03 PM (This post was last modified: 2024-08-25, 03:05 PM by martyc1981. Edited 2 times in total.)
    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?
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-08-25, 04:48 PM
    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".
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    phuzzy
    Offline

    Junior Member

    Posts: 2
    Threads: 0
    Joined: 2024 Nov
    Reputation: 0
    Country:United States
    #3
    2024-11-22, 07:07 AM
    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
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2024-11-22, 01:47 PM
    Did you make changes to the jellyfin.service file or /etc/default/jellyfin?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    phuzzy
    Offline

    Junior Member

    Posts: 2
    Threads: 0
    Joined: 2024 Nov
    Reputation: 0
    Country:United States
    #5
    2024-11-22, 02:33 PM (This post was last modified: 2024-11-22, 02:55 PM by phuzzy. Edited 1 time in total.)
    (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
    bythelake
    Offline

    Junior Member

    Posts: 2
    Threads: 0
    Joined: 2025 Mar
    Reputation: 0
    Country:United States
    #6
    2025-03-08, 10:21 PM
    (2024-11-22, 07:07 AM)phuzzy Wrote: 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
    Thanks for sharing.  I performed the steps above, yet when the new instance of Jellyfin was installed with the curl statement, it still seemed to remember details from my original installation.  Losing my password has been a friggin' nightmare, as none of the "reset" steps have worked.  I will probably have to delete the VM and start all over, which kills me, as I have years of work into this.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #7
    2025-03-09, 07:20 PM
    Removing the directories specified in this command will wipe out everything on the server related to your current jellyfin install.

    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

    Did you clear your browser cache? What are you seeing in that makes you think it "remembered" anything from a prior install?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode